Skip to content

Commit cc30de0

Browse files
ddicksteinlet-def
authored andcommitted
Revert "fix #553"
This reverts commit 7efcb22. The problem reported in #553 is not reproducible when this commit is reverted, so it's likely that the underlying Neovim bug that caused it has been resolved. The fix introduces a problem where the window is scrolled (#1221), so this commit reverts it.
1 parent ccb9e95 commit cc30de0

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

vim/merlin/autoload/merlin.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function! s:ShowTypeEnclosing(type)
237237

238238
let g:merlin_latest_type = a:type['type']
239239

240-
if g:merlin_type_history_height <= 0 || (!has("nvim") && (v:version <= 703 || !has("patch-7.4.424")))
240+
if g:merlin_type_history_height <= 0 || v:version <= 703 || !has("patch-7.4.424")
241241
echo a:type['type'] . a:type['tail_info']
242242
return
243243
endif

vim/merlin/autoload/merlin_type.vim

+1-10
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ function! s:RecordType(type)
6464

6565
" vimscript can't append to a buffer without a refresh (?!)
6666
MerlinPy << EOF
67-
68-
# Vim cursor is a global state that will leak.
69-
# Nvim will complain the cursor is outside of buffer (using cursor from
70-
# current buffer in the type buffer).
71-
# So put it to origin and restore it later.
72-
cw = vim.current.window
73-
cursor = cw.cursor
74-
cw.cursor = (1,0)
75-
7667
idx = int(vim.eval("g:merlin_type_history"))
7768
typ = vim.eval("a:type")
7869
buf = None
@@ -95,7 +86,7 @@ else:
9586

9687
# Note that this leaves a blank line at the beginning of the buffer, but
9788
# it is apparently the desired behavior.
98-
cw.cursor = cursor
89+
9990
EOF
10091

10192
call winrestview(l:view)

0 commit comments

Comments
 (0)