Added traditional control character behavior for some characters. - sam - An updated version of the sam text editor.
(HTM) git clone git://vernunftzentrum.de/sam.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 27b1822c3fcadf1292d66a728772c46a92fa6b32
(DIR) parent 01ad626bdf6f0bfd7cea3f101193cf814687bab5
(HTM) Author: Rob King <jking@deadpixi.com>
Date: Tue, 13 Sep 2016 10:45:01 -0500
Added traditional control character behavior for some characters.
Diffstat:
samterm/samrc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/samterm/samrc.c b/samterm/samrc.c
@@ -107,7 +107,7 @@ struct Defaultbinding{
};
static Defaultbinding defaultbindings[] ={
- /* Motion commands. */
+ /* Motion commands following the WordStar diamond. */
{ControlMask, XK_e, Kcommand, Clineup},
{ControlMask, XK_x, Kcommand, Clinedown},
{ControlMask, XK_d, Kcommand, Ccharright},
@@ -154,6 +154,12 @@ static Defaultbinding defaultbindings[] ={
{0, XK_KP_Decimal, Kraw, '.'},
{0, XK_hyphen, Kraw, '-'},
+ /* Support traditional control sequences. */
+ {ControlMask, XK_h, Kcommand, Cdel},
+ {ControlMask, XK_i, Kraw, '\t'},
+ {ControlMask, XK_j, Kraw, '\n'},
+ {ControlMask, XK_m, Kraw, '\r'},
+
/* Use Control-Tab to insert a literal tab when tab expansion is enabled. */
{ControlMask, XK_Tab, Kcomposed, '\t'},