Patches for editor

Steef Boerrigter sxmboer at sci.kun.nl
Tue Jul 10 09:42:38 UTC 2001


Hi Pavel,

Here's the bit of my patch that should at least work against the current
version. It fixes the missing ALT-B (I had it working as a macro as a
temporary fix) and some other keys that probably only work in the linux
console (my typical hacking environment, by the way!)

> That's very interesting. I fixed a memory problem yesterday (l_hotlist was
> used after being freed in hotlist.c), so please use my snapshot for
> further testing. I'm afraid that you are dealing with the bugs that
> haven't been fixed yet, but it's better not to fix already fixed problems.
I noticed the bug is gone! It crashes mc on my SGI-Indy on the official
5.4.54 version, but not on the snapshot.

Less importantly: I'm giving up on the beefed up status line in the
editor. I noticed <EOF> made it into the snapshot, although I liked my
format better ;-)

I see I have to redo the dynamic version of mad.c as the current version
changed too much. Also, I have to automate the inclusion of a solve to
the alignment error for the SGI/Mips.

Steef
-------------- next part --------------
diff -ru mc-4.5.54/edit/edit_key_translator.c mc-4.5.54.new/edit/edit_key_translator.c
--- mc-4.5.54/edit/edit_key_translator.c	Wed Nov  1 07:19:40 2000
+++ mc-4.5.54.new/edit/edit_key_translator.c	Sun Apr 22 03:11:23 2001
@@ -61,7 +61,9 @@
      KEY_F (4), CK_Replace, KEY_F (7), CK_Find, KEY_F (14), CK_Replace_Again,
      XCTRL ('h'), CK_BackSpace, ALT ('l'), CK_Goto, ALT ('L'), CK_Goto, XCTRL ('y'), CK_Delete_Line,
      KEY_F (17), CK_Find_Again, ALT ('p'), CK_Paragraph_Format,
+     ALT ('b'), CK_Match_Bracket,
      0177, CK_BackSpace,
+
      0, 0};
 
     static long const emacs_key_map[] =
@@ -190,6 +192,12 @@
 	case KEY_RIGHT:
 	    command = CK_Word_Right_Highlight;
 	    goto fin;
+	case KEY_UP:
+	    command = CK_Scroll_Up_Highlight;
+	    goto fin;
+	case KEY_DOWN:
+	    command = CK_Scroll_Down_Highlight;
+	    goto fin;
 	}
     }
     if ((x_state & SHIFT_PRESSED) && !(x_state & CONTROL_PRESSED)) {


More information about the mc mailing list