diff options
| author | aarne <unknown> | 2005-08-17 14:13:55 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2005-08-17 14:13:55 +0000 |
| commit | b235391d514986d56d8ce7067da0547fc403df2a (patch) | |
| tree | 054b2f84a9c83c8170e477b0fc88ececf8269cdb /src/GF/UseGrammar | |
| parent | dfba9956ae4e0d1a485a165cc83bc382580a5513 (diff) | |
edit command ct pos1 pos2; fixed undo bug
Diffstat (limited to 'src/GF/UseGrammar')
| -rw-r--r-- | src/GF/UseGrammar/Session.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/GF/UseGrammar/Session.hs b/src/GF/UseGrammar/Session.hs index 4271a0034..e54d0e3fb 100644 --- a/src/GF/UseGrammar/Session.hs +++ b/src/GF/UseGrammar/Session.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/06/11 20:27:05 $ +-- > CVS $Date: 2005/08/17 15:13:55 $ -- > CVS $Author: aarne $ --- > CVS $Revision: 1.11 $ +-- > CVS $Revision: 1.12 $ -- -- (Description of the module) ----------------------------------------------------------------------------- @@ -88,6 +88,7 @@ removeClip n ss@((s,(ts,cb),(i,b)):_) = (s,(ts, drop n cb),(i,b)) : ss changeMsg :: [String] -> ECommand changeMsg m ((s,ts,(_,b)):ss) = (s,ts,(m,b)) : ss -- just change message +changeMsg m _ = (s,ts,(m,b)) : [] where [(s,ts,(_,b))] = initSState changeView :: ECommand changeView ((s,ts,(m,(v,b))):ss) = (s,ts,(m,(v+1,b))) : ss -- toggle view @@ -126,7 +127,7 @@ undoCommand :: Int -> ECommand undoCommand n ss = let k = length ss in if k < n - then changeMsg ["cannot go all the way back"] [] + then changeMsg ["cannot go all the way back"] [last ss] else changeMsg ["successful undo"] (drop n ss) selectCand :: CGrammar -> Int -> ECommand |
