Skip to content

Commit 7eec467

Browse files
chrisbracxw42
authored andcommitted
Don't set tabstop in shell buffers (#224)
:FZF opens a terminal in the same window as the current buffer, and setbufvar(tabstop) affects the cursor position in the current buffer as well as the cursor position in the terminal buffer. To avoid that, don't set tabstop in terminal windows running shells.
1 parent 0d54ea8 commit 7eec467

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugin/editorconfig.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,8 @@ function! s:ApplyConfig(bufnr, config) abort
454454
endif
455455
endif
456456

457-
if s:IsRuleActive('tab_width', a:config)
457+
" Set tabstop. Skip this for terminal buffers, e.g., :FZF (#224).
458+
if s:IsRuleActive('tab_width', a:config) && bufname(l:bufnr) !~# '^!\w*sh$'
458459
let l:tabstop = str2nr(a:config["tab_width"])
459460
call setbufvar(a:bufnr, '&tabstop', l:tabstop)
460461
else

0 commit comments

Comments
 (0)