diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/autoload/netrw.vim | 5 | ||||
| -rw-r--r-- | runtime/doc/options.txt | 20 | ||||
| -rw-r--r-- | runtime/doc/ui.txt | 6 | ||||
| -rw-r--r-- | runtime/filetype.vim | 13 | ||||
| -rw-r--r-- | runtime/lua/vim/lsp.lua | 2 | ||||
| -rw-r--r-- | runtime/lua/vim/lsp/util.lua | 4 | ||||
| -rw-r--r-- | runtime/lua/vim/uri.lua | 3 |
7 files changed, 43 insertions, 10 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index fa86223d53..b69ad7187a 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -5460,6 +5460,11 @@ fun! netrw#CheckIfRemote(...) else let curfile= expand("%") endif + + " Ignore terminal buffers + if &buftype ==# 'terminal' + return 0 + endif " call Decho("curfile<".curfile.">") if curfile =~ '^\a\{3,}://' " call Dret("netrw#CheckIfRemote 1") diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 283b2c3f12..5fb80d75ce 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4900,13 +4900,17 @@ A jump table for the options with a short description can be found at |Q_op|. *'scrolloff'* *'so'* 'scrolloff' 'so' number (default 0) - global + global or local to window |global-local| Minimal number of screen lines to keep above and below the cursor. This will make some context visible around where you are working. If you set it to a very large value (999) the cursor line will always be in the middle of the window (except at the start or end of the file or when long lines wrap). - For scrolling horizontally see 'sidescrolloff'. + After using the local value, go back the global value with one of + these two: > + setlocal scrolloff< + setlocal scrolloff=-1 +< For scrolling horizontally see 'sidescrolloff'. *'scrollopt'* *'sbo'* 'scrollopt' 'sbo' string (default "ver,jump") @@ -5515,7 +5519,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'sidescrolloff'* *'siso'* 'sidescrolloff' 'siso' number (default 0) - global + global or local to window |global-local| The minimal number of screen columns to keep to the left and to the right of the cursor if 'nowrap' is set. Setting this option to a value greater than 0 while having |'sidescroll'| also at a non-zero @@ -5524,7 +5528,11 @@ A jump table for the options with a short description can be found at |Q_op|. to a large value (like 999) has the effect of keeping the cursor horizontally centered in the window, as long as one does not come too close to the beginning of the line. - + After using the local value, go back the global value with one of + these two: > + setlocal sidescrolloff< + setlocal sidescrolloff=-1 +< Example: Try this together with 'sidescroll' and 'listchars' as in the following example to never allow the cursor to move onto the "extends" character: > @@ -6693,6 +6701,10 @@ A jump table for the options with a short description can be found at |Q_op|. While the menu is active these keys have special meanings: + CTRL-Y - accept the currently selected match and stop + completion. + CTRL-E - end completion, go back to what was there before + selecting a match. <Left> <Right> - select previous/next match (like CTRL-P/CTRL-N) <Down> - in filename/menu name completion: move into a subdirectory or submenu. diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index de54ce59b6..b243d9ba50 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -592,6 +592,12 @@ tabs. When |ext_messages| is active, no message grid is used, and this event will not be sent. +["win_viewport", grid, win, topline, botline, curline, curcol] + Indicates the range of buffer text displayed in the window, as well + as the cursor position in the buffer. All positions are zero-based. + `botline` is set to one more than the line count of the buffer, if + there are filler lines past the end. + ============================================================================== Popupmenu Events *ui-popupmenu* diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 49e1e9909b..dbdd90041c 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2019 Nov 26 +" Last Change: 2020 Apr 12 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -229,6 +229,9 @@ au BufNewFile,BufRead *.bl setf blank " Blkid cache file au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml +" BSDL +au BufNewFile,BufRead *.bsdl setf bsdl + " Bazel (http://bazel.io) autocmd BufRead,BufNewFile *.bzl,WORKSPACE,BUILD.bazel setf bzl if has("fname_case") @@ -1639,9 +1642,11 @@ au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl " Systemd unit files au BufNewFile,BufRead */systemd/*.{automount,mount,path,service,socket,swap,target,timer} setf systemd " Systemd overrides -au BufNewFile,BufRead /etc/systemd/system/*.d/*.conf setf systemd +au BufNewFile,BufRead */etc/systemd/system/*.d/*.conf setf systemd +au BufNewFile,BufRead */.config/systemd/user/*.d/*.conf setf systemd " Systemd temp files -au BufNewFile,BufRead /etc/systemd/system/*.d/.#* setf systemd +au BufNewFile,BufRead */etc/systemd/system/*.d/.#* setf systemd +au BufNewFile,BufRead */.config/systemd/user/*.d/.#* setf systemd " Synopsys Design Constraints au BufNewFile,BufRead *.sdc setf sdc @@ -1772,7 +1777,7 @@ au BufNewFile,BufRead *.va,*.vams setf verilogams au BufNewFile,BufRead *.sv,*.svh setf systemverilog " VHDL -au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl +au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst,*.vho setf vhdl " Vim script au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 8af20ea1f9..afff4d9900 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -614,6 +614,8 @@ do if tbl_isempty(all_buffer_active_clients[bufnr] or {}) then return end + + util.buf_versions[bufnr] = changedtick -- Lazy initialize these because clients may not even need them. local incremental_changes = once(function(client) local size_index = encoding_index[client.offset_encoding] diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 72c84b8471..5dd010f2a4 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -135,7 +135,7 @@ function M.apply_text_document_edit(text_document_edit) local text_document = text_document_edit.textDocument local bufnr = vim.uri_to_bufnr(text_document.uri) -- TODO(ashkan) check this is correct. - if api.nvim_buf_get_changedtick(bufnr) > text_document.version then + if (M.buf_versions[bufnr] or 0) > text_document.version then print("Buffer ", text_document.uri, " newer than edits.") return end @@ -961,5 +961,7 @@ function M.character_offset(buf, row, col) return str_utfindex(line, col) end +M.buf_versions = {} + return M -- vim:sw=2 ts=2 et diff --git a/runtime/lua/vim/uri.lua b/runtime/lua/vim/uri.lua index 1065f84f4c..d91fb7ffd3 100644 --- a/runtime/lua/vim/uri.lua +++ b/runtime/lua/vim/uri.lua @@ -70,6 +70,7 @@ local function uri_from_bufnr(bufnr) end local function uri_to_fname(uri) + uri = uri_decode(uri) -- TODO improve this. if is_windows_file_uri(uri) then uri = uri:gsub('^file:///', '') @@ -77,7 +78,7 @@ local function uri_to_fname(uri) else uri = uri:gsub('^file://', '') end - return uri_decode(uri) + return uri end -- Return or create a buffer for a uri. |