summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-12-10 12:13:01 +0000
committeraarne <aarne@cs.chalmers.se>2008-12-10 12:13:01 +0000
commitefdbf69b9303fb6e1899901f735fd662d6a016e6 (patch)
tree647b99dc73172a024cba89dceb1c0ec6c8c06c63
parent5974263e95dafa55b02c1ca13f36ef2d56636e3b (diff)
fix in Editor
-rw-r--r--src/PGF/Editor.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PGF/Editor.hs b/src/PGF/Editor.hs
index ca268d530..5c693cc96 100644
--- a/src/PGF/Editor.hs
+++ b/src/PGF/Editor.hs
@@ -123,12 +123,12 @@ down = (++[0])
left :: Position -> Position
left p = case p of
- (n:ns) | n > 0 -> n-1 : ns
+ _:_ | last p > 0 -> init p ++ [last p - 1]
_ -> top
right :: Position -> Position
right p = case p of
- (n:ns) -> n+1 : ns
+ _:_ -> init p ++ [last p + 1]
_ -> top
etree2state :: ETree -> State