--- config.def.h | 3 +++ editor.c | 7 +++++-- vis.c | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config.def.h b/config.def.h index cfd1771..87f0f6b 100644 --- a/config.def.h +++ b/config.def.h _AT_@ -12,6 +12,9 @@ { { NONE(127) }, (func), { .name = (arg) } }, \ { { CONTROL('B') }, (func), { .name = (arg) } } +#define TABWIDTH 8 +#define EXPANDTAB false + /* a mode contains a set of key bindings which are currently valid. * * each mode can specify one parent mode which is consultated if a given key diff --git a/editor.c b/editor.c index ef59242..38256df 100644 --- a/editor.c +++ b/editor.c _AT_@ -17,6 +17,9 @@ # define MAX_COLOR_PAIRS COLOR_PAIRS #endif +extern int tabwidth; +extern int expandtab; + static EditorWin *editor_window_new_text(Editor *ed, Text *text); static void editor_window_free(Editor *ed, EditorWin *win); static void editor_windows_invalidate(Editor *ed, size_t start, size_t end); _AT_@ -441,8 +444,8 @@ Editor *editor_new(int width, int height) { goto err; ed->width = width; ed->height = height; - ed->tabwidth = 8; - ed->expandtab = false; + ed->tabwidth = tabwidth; + ed->expandtab = expandtab; ed->windows_arrange = windows_arrange_horizontal; return ed; err: diff --git a/vis.c b/vis.c index cb401d9..c60db6b 100644 --- a/vis.c +++ b/vis.c _AT_@ -526,6 +526,9 @@ static void switchmode_to(Mode *new_mode); #include "config.h" +int tabwidth = TABWIDTH; +int expandtab = EXPANDTAB; + static Key getkey(void); static void keypress(Key *key); static void action_do(Action *a); -- 1.8.5.5 --Multipart=_Sun__4_Jan_2015_17_55_11_+0100_heY=cHMHpLiFs4qc--Received on Mon Sep 17 2001 - 00:00:00 CEST
This archive was generated by hypermail 2.3.0 : Sun Jan 04 2015 - 18:12:03 CET