This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: control-a -vs- horizontal scrollbar


Type a long line into the console window -- long enough to cause
horizontal scrolling.  Now use C-a or C-u to go to the start of the
line.  Notice that the cursor is not visible.

The appended patch fixes this.

For C-a and C-u we make the linestart visible, since this is the most
natural behavior.  For C-w we just make the insertion cursor visible
-- not the very best thing, but ok.

2000-04-08  Tom Tromey  <tromey@cygnus.com>

	* console.itb (Console::_build_win): Make Control-a, Control-u,
	and Control-w bindings show the insertion point.

Tom

Index: gdbtk/library/console.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/console.itb,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 console.itb
--- console.itb	2000/02/07 00:19:42	1.1.1.1
+++ console.itb	2000/04/08 21:20:31
@@ -88,18 +88,21 @@
   # Control-a moves to start of line.
   bind_plain_key $_twin Control-a {
     %W mark set insert {cmdmark + 1 char}
+    %W see {insert linestart}
     break
   }
 
   # Control-u deletes to start of line.
   bind_plain_key $_twin Control-u {
     %W delete {cmdmark + 1 char} insert
+    %W see {insert linestart}
   }
   
   # Control-w deletes previous word.
   bind_plain_key $_twin Control-w {
     if {[%W compare {insert -1c wordstart} > cmdmark]} {
       %W delete {insert -1c wordstart} insert
+      %W see insert
     }
   }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]