diff options
author | Ron Yorston <rmy@pobox.com> | 2021-06-11 13:22:25 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-14 20:58:17 +0200 |
commit | 52c4b7ac3bbc216cc5fd40cf150517f36e7bb87a (patch) | |
tree | feb5661033534900d2bc8aae40fbdb59755e5004 | |
parent | f7ed0e8ae0508fafe91ae3eb20663b9f7870adda (diff) | |
download | busybox-w32-52c4b7ac3bbc216cc5fd40cf150517f36e7bb87a.tar.gz busybox-w32-52c4b7ac3bbc216cc5fd40cf150517f36e7bb87a.tar.bz2 busybox-w32-52c4b7ac3bbc216cc5fd40cf150517f36e7bb87a.zip |
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>
-rw-r--r-- | editors/vi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c index 7c1877bb2..ba608fbd2 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -536,6 +536,7 @@ struct globals { | |||
536 | last_modified_count = -1; \ | 536 | last_modified_count = -1; \ |
537 | /* "" but has space for 2 chars: */ \ | 537 | /* "" but has space for 2 chars: */ \ |
538 | IF_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \ | 538 | IF_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \ |
539 | tabstop = 8; \ | ||
539 | } while (0) | 540 | } while (0) |
540 | 541 | ||
541 | #if ENABLE_FEATURE_VI_CRASHME | 542 | #if ENABLE_FEATURE_VI_CRASHME |
@@ -4619,7 +4620,6 @@ static void edit_file(char *fn) | |||
4619 | 4620 | ||
4620 | cmd_mode = 0; // 0=command 1=insert 2='R'eplace | 4621 | cmd_mode = 0; // 0=command 1=insert 2='R'eplace |
4621 | cmdcnt = 0; | 4622 | cmdcnt = 0; |
4622 | tabstop = 8; | ||
4623 | offset = 0; // no horizontal offset | 4623 | offset = 0; // no horizontal offset |
4624 | c = '\0'; | 4624 | c = '\0'; |
4625 | #if ENABLE_FEATURE_VI_DOT_CMD | 4625 | #if ENABLE_FEATURE_VI_DOT_CMD |