vi: initialise tabstop once not for each file
The default tabstop value should be set during early start up, not reset for each new file. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
f7ed0e8ae0
commit
52c4b7ac3b
@@ -536,6 +536,7 @@ struct globals {
|
|||||||
last_modified_count = -1; \
|
last_modified_count = -1; \
|
||||||
/* "" but has space for 2 chars: */ \
|
/* "" but has space for 2 chars: */ \
|
||||||
IF_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \
|
IF_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \
|
||||||
|
tabstop = 8; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#if ENABLE_FEATURE_VI_CRASHME
|
#if ENABLE_FEATURE_VI_CRASHME
|
||||||
@@ -4619,7 +4620,6 @@ static void edit_file(char *fn)
|
|||||||
|
|
||||||
cmd_mode = 0; // 0=command 1=insert 2='R'eplace
|
cmd_mode = 0; // 0=command 1=insert 2='R'eplace
|
||||||
cmdcnt = 0;
|
cmdcnt = 0;
|
||||||
tabstop = 8;
|
|
||||||
offset = 0; // no horizontal offset
|
offset = 0; // no horizontal offset
|
||||||
c = '\0';
|
c = '\0';
|
||||||
#if ENABLE_FEATURE_VI_DOT_CMD
|
#if ENABLE_FEATURE_VI_DOT_CMD
|
||||||
|
Reference in New Issue
Block a user