[patch] fix cursor display in hex viewer



Hi,

after opening a file in the viewer, the cursor does not appear when the
viewer was left in the hex mode previously. The atached patch fixes this
issue.

Steps to reproduce:

press F3 on a file
press F4 to switch to hex
press F10 to exit the viewer
press F3 again - the cursor stays in the top right corner

-- 
Jindrich Makovicka
Index: view.c
===================================================================
RCS file: /cvsroot/mc/mc/src/view.c,v
retrieving revision 1.339
diff -u -r1.339 view.c
--- view.c	22 Aug 2005 19:19:51 -0000	1.339
+++ view.c	26 Aug 2005 07:07:35 -0000
@@ -3376,7 +3376,6 @@
     init_widget (&view->widget, y, x, lines, cols,
 		 view_callback,
 		 real_view_event);
-    widget_want_cursor (view->widget, 0);
 
     view->filename          = NULL;
     view->command           = NULL;
@@ -3387,6 +3386,7 @@
     /* leave the other growbuf fields uninitialized */
 
     view->hex_mode          = default_hex_mode;
+    widget_want_cursor (view->widget, view->hex_mode);
     view->hexedit_mode      = default_hexedit_mode;
     view->hexview_in_text   = FALSE;
     view->text_nroff_mode   = default_nroff_flag;


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