fenfire-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ff-cvs] fenfire/org/fenfire/demo mm.py


From: Asko Soukka
Subject: [ff-cvs] fenfire/org/fenfire/demo mm.py
Date: Mon, 18 Aug 2003 09:57:14 -0400

CVSROOT:        /cvsroot/fenfire
Module name:    fenfire
Branch:         
Changes by:     Asko Soukka <address@hidden>    03/08/18 09:57:14

Modified files:
        org/fenfire/demo: mm.py 

Log message:
        fix cursor move

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/demo/mm.py.diff?tr1=1.25&tr2=1.26&r1=text&r2=text

Patches:
Index: fenfire/org/fenfire/demo/mm.py
diff -u fenfire/org/fenfire/demo/mm.py:1.25 fenfire/org/fenfire/demo/mm.py:1.26
--- fenfire/org/fenfire/demo/mm.py:1.25 Mon Aug 18 09:55:41 2003
+++ fenfire/org/fenfire/demo/mm.py      Mon Aug 18 09:57:14 2003
@@ -431,17 +431,17 @@
         elif key == 'Up':
             """Move the cursor to the previous line."""
             xy = jarray.zeros(2, 'f')
-            nodeview.getXY(fen.graph, context.getAccursed(),
+            normal_text.getXY(fen.graph, context.getAccursed(),
                                context.offset, xy)
             xy[1] -= textstyle.getHeight(1)
-            context.offset = nodeview.getPos(fen.graph, context.getAccursed(), 
xy[0], xy[1])
+            context.offset = normal_text.getPos(fen.graph, 
context.getAccursed(), xy[0], xy[1])
        elif key == 'Down':
             """Move the cursor to the next line."""
             xy = jarray.zeros(2, 'f')
-            nodeview.getXY(fen.graph, context.getAccursed(),
+            normal_text.getXY(fen.graph, context.getAccursed(),
                                context.offset, xy)
             xy[1] += textstyle.getHeight(1)
-            context.offset = nodeview.getPos(fen.graph, context.getAccursed(), 
xy[0], xy[1])
+            context.offset = normal_text.getPos(fen.graph, 
context.getAccursed(), xy[0], xy[1])
        elif key == 'Left':
             """Move the cursor a character to the left."""
             if context.offset > 0: context.offset -= 1
@@ -468,20 +468,20 @@
         if key == "Home" or key == "Ctrl-A":
             """Move the cursor into the beginning of the line."""
             xy = jarray.zeros(2, 'f')
-            nodeview.getXY(fen.graph, context.getAccursed(),
+            normal_text.getXY(fen.graph, context.getAccursed(),
                                context.offset, xy)
             xy[0] = 0
-            context.offset = nodeview.getPos(fen.graph, context.getAccursed(), 
xy[0], xy[1])            
+            context.offset = normal_text.getPos(fen.graph, 
context.getAccursed(), xy[0], xy[1])            
         if key == "End" or key == "Ctrl-E":
             """Move the cursor to the end of the line."""
             # the end of line is reached by going to home of the line below
             # and returning a single character back if not the end of text was 
reached
             xy = jarray.zeros(2, 'f')
-            nodeview.getXY(fen.graph, context.getAccursed(),
+            normal_text.getXY(fen.graph, context.getAccursed(),
                                context.offset, xy)
             xy[0] = 0
             xy[1] += textstyle.getHeight(1)
-            context.offset = nodeview.getPos(fen.graph, context.getAccursed(), 
xy[0], xy[1])
+            context.offset = normal_text.getPos(fen.graph, 
context.getAccursed(), xy[0], xy[1])
             text = alphContent.getText(fen.graph, context.getAccursed())
             if context.offset < len(text): context.offset -= 1
         elif len(key) == 1:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]