From b235391d514986d56d8ce7067da0547fc403df2a Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 17 Aug 2005 14:13:55 +0000 Subject: edit command ct pos1 pos2; fixed undo bug --- src/GF/Shell/Commands.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/GF/Shell/Commands.hs') diff --git a/src/GF/Shell/Commands.hs b/src/GF/Shell/Commands.hs index 2bcf59dba..b1160d151 100644 --- a/src/GF/Shell/Commands.hs +++ b/src/GF/Shell/Commands.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/08/17 14:43:50 $ +-- > CVS $Date: 2005/08/17 15:13:55 $ -- > CVS $Author: aarne $ --- > CVS $Revision: 1.40 $ +-- > CVS $Revision: 1.41 $ -- -- temporary hacks for GF 2.0 -- @@ -76,7 +76,7 @@ data Command = | CTop | CLast | CMovePosition [Int] - | CCopyPosition [Int] + | CCopyPosition [Int] [Int] | CRefineWithTree String | CRefineWithClip Int | CRefineWithAtom String @@ -257,12 +257,13 @@ execECommand env c = case c of in (case et of Ok t -> refineByTrees der cgr [t] s Bad m -> changeMsg [m] s) - CCopyPosition p -> action2command $ \s -> do + CCopyPosition p q -> action2command $ \s -> do s1 <- goPosition p s let t = actTree s1 - let compat = actVal s1 == actVal s + s2 <- goPosition q s1 + let compat = actVal s1 == actVal s2 if compat - then refineWithTree der cgr t s + then refineWithTree der cgr t s2 else return s CRefineParse str -> \s -> -- cgit v1.2.3