summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/codeql-analysis.yml2
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--README.md14
-rw-r--r--README.txt12
-rw-r--r--README_VIM9.md2
-rw-r--r--nsis/lang/turkish.nsi14
-rw-r--r--pixmaps/gen-inline-pixbufs.sh6
-rw-r--r--runtime/autoload/netrw.vim293
-rw-r--r--runtime/autoload/netrwSettings.vim8
-rw-r--r--runtime/doc/eval.txt32
-rw-r--r--runtime/doc/index.txt2
-rw-r--r--runtime/doc/insert.txt2
-rw-r--r--runtime/doc/options.txt15
-rw-r--r--runtime/doc/pi_netrw.txt84
-rw-r--r--runtime/doc/popup.txt25
-rw-r--r--runtime/doc/syntax.txt11
-rw-r--r--runtime/doc/tags5
-rw-r--r--runtime/doc/term.txt38
-rw-r--r--runtime/doc/terminal.txt28
-rw-r--r--runtime/doc/testing.txt24
-rw-r--r--runtime/doc/textprop.txt2
-rw-r--r--runtime/doc/todo.txt6
-rw-r--r--runtime/doc/version6.txt2
-rw-r--r--runtime/doc/vim9.txt15
-rw-r--r--runtime/filetype.vim2
-rw-r--r--runtime/ftplugin/scala.vim6
-rw-r--r--runtime/indent/scala.vim9
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim6
-rw-r--r--runtime/plugin/netrwPlugin.vim28
-rw-r--r--runtime/syntax/cpp.vim21
-rw-r--r--runtime/syntax/gemtext.vim24
-rw-r--r--runtime/syntax/scala.vim24
-rw-r--r--runtime/syntax/structurizr.vim76
-rw-r--r--runtime/tutor/tutor10
-rw-r--r--runtime/tutor/tutor.utf-810
-rw-r--r--src/INSTALL1
-rw-r--r--src/gvimtutor2
-rwxr-xr-xsrc/vimtutor26
-rw-r--r--vimtutor.bat2
39 files changed, 649 insertions, 242 deletions
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index ef98000f89..482eb5c133 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -38,7 +38,7 @@ jobs:
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
+ # By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ef518f8ccf..4918d5a8a5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -57,7 +57,7 @@ If you find a problem with one of these files or have a suggestion for
improvement, please first try to contact the maintainer directly.
Look in the header of the file for the name and email address.
-The maintainer will take care of issues and send updates to Bram for
+The maintainer will take care of issues and send updates to Bram for
distribution with Vim.
If the maintainer does not respond, contact the vim-dev maillist.
diff --git a/README.md b/README.md
index 1cb89fc5e0..5c8403c3f9 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ This `README.md` file comes with the runtime archive. It includes the
documentation, syntax files and other files that are used at runtime. To run
Vim you must get either one of the binary archives or a source archive.
Which one you need depends on the system you want to run it on and whether you
-want or must compile it yourself. Check http://www.vim.org/download.php for
+want or must compile it yourself. Check https://www.vim.org/download.php for
an overview of currently available distributions.
Some popular places to get the latest Vim:
@@ -86,7 +86,7 @@ The Vim tutor is a one hour training course for beginners. Often it can be
started as `vimtutor`. See `:help tutor` for more information.
The best is to use `:help` in Vim. If you don't have an executable yet, read
-[`runtime/doc/help.txt`](/runtime/doc/help.txt).
+[`runtime/doc/help.txt`](/runtime/doc/help.txt).
It contains pointers to the other documentation files.
The User Manual reads like a book and is recommended to learn to use
Vim. See `:help user-manual`.
@@ -117,7 +117,7 @@ in Uganda. See [`runtime/doc/uganda.txt`](runtime/doc/uganda.txt). But
at the same time donations increase Bram's motivation to keep working on Vim!
For the most recent information about sponsoring look on the Vim web site:
- http://www.vim.org/sponsor/
+ https://www.vim.org/sponsor/
## Contributing ##
@@ -129,15 +129,15 @@ If you would like to help making Vim better, see the
## Information ##
The latest news about Vim can be found on the Vim home page:
- http://www.vim.org/
+ https://www.vim.org/
If you have problems, have a look at the Vim documentation or tips:
- http://www.vim.org/docs.php
- http://vim.wikia.com/wiki/Vim_Tips_Wiki
+ https://www.vim.org/docs.php
+ https://vim.fandom.com/wiki/Vim_Tips_Wiki
If you still have problems or any other questions, use one of the mailing
lists to discuss them with Vim users and developers:
- http://www.vim.org/maillist.php
+ https://www.vim.org/maillist.php
If nothing else works, report bugs directly:
Bram Moolenaar <Bram@vim.org>
diff --git a/README.txt b/README.txt
index ead022b42b..54f207c0d8 100644
--- a/README.txt
+++ b/README.txt
@@ -33,7 +33,7 @@ This README.txt file comes with the runtime archive. It includes the
documentation, syntax files and other files that are used at runtime. To run
Vim you must get either one of the binary archives or a source archive.
Which one you need depends on the system you want to run it on and whether you
-want or must compile it yourself. Check "http://www.vim.org/download.php" for
+want or must compile it yourself. Check "https://www.vim.org/download.php" for
an overview of currently available distributions.
Some popular places to get the latest Vim:
@@ -101,7 +101,7 @@ increase Bram's motivation to keep working on Vim!
For the most recent information about sponsoring look on the Vim web site:
- http://www.vim.org/sponsor/
+ https://www.vim.org/sponsor/
CONTRIBUTING
@@ -112,15 +112,15 @@ If you would like to help making Vim better, see the CONTRIBUTING.md file.
INFORMATION
The latest news about Vim can be found on the Vim home page:
- http://www.vim.org/
+ https://www.vim.org/
If you have problems, have a look at the Vim documentation or tips:
- http://www.vim.org/docs.php
- http://vim.wikia.com/wiki/Vim_Tips_Wiki
+ https://www.vim.org/docs.php
+ https://vim.fandom.com/wiki/Vim_Tips_Wiki
If you still have problems or any other questions, use one of the mailing
lists to discuss them with Vim users and developers:
- http://www.vim.org/maillist.php
+ https://www.vim.org/maillist.php
If nothing else works, report bugs directly:
Bram Moolenaar <Bram@vim.org>
diff --git a/README_VIM9.md b/README_VIM9.md
index e4d2914f4d..b3ca49f091 100644
--- a/README_VIM9.md
+++ b/README_VIM9.md
@@ -337,7 +337,7 @@ let start = reltime()
echo Python()
echo 'Python: ' .. reltimestr(reltime(start))
bwipe!
-
+
new
call setline(1, range(100000))
let start = reltime()
diff --git a/nsis/lang/turkish.nsi b/nsis/lang/turkish.nsi
index 43cdb5201c..4c966c5034 100644
--- a/nsis/lang/turkish.nsi
+++ b/nsis/lang/turkish.nsi
@@ -10,7 +10,7 @@ LangString ^SetupCaption ${LANG_TURKISH} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_TURKISH} \
"$(^Name) Uninstall"
-
+
LangString str_show_readme ${LANG_TURKISH} \
"Kurulum bittikten sonra README dosyasını aç"
@@ -23,7 +23,7 @@ LangString str_type_minimal ${LANG_TURKISH} \
LangString str_type_full ${LANG_TURKISH} \
"Tam"
-
+
##############################################################################
# Section Titles & Description {{{1
##############################################################################
@@ -62,12 +62,12 @@ LangString str_section_start_menu ${LANG_TURKISH} \
"Başlat Menüsü - Programlar klasöründe"
LangString str_desc_start_menu ${LANG_TURKISH} \
"Vim kısayolunu Başlat Menüsüne ekler."
-
+
LangString str_section_edit_with ${LANG_TURKISH} \
"Vim ile Aç"
LangString str_desc_edit_with ${LANG_TURKISH} \
"Vim'i $\"Birlikte aç$\" sağ tık menüsüne ekler."
-
+
LangString str_section_vim_rc ${LANG_TURKISH} \
"Bir yapılandırma dosyası oluştur"
LangString str_desc_vim_rc ${LANG_TURKISH} \
@@ -93,7 +93,7 @@ LangString str_desc_plugin_vim ${LANG_TURKISH} \
LangString str_section_vis_vim ${LANG_TURKISH} \
"VisVim eklentisi"
LangString str_desc_vis_vim ${LANG_TURKISH} \
- "Microsoft Visual Studio entegrasyonu için VisVim eklentisi"
+ "Microsoft Visual Studio entegrasyonu için VisVim eklentisi"
LangString str_section_nls ${LANG_TURKISH} \
"Ek dil desteği"
@@ -129,14 +129,14 @@ LangString str_unsection_rootdir ${LANG_TURKISH} \
"Vim kök dizinini kaldır"
LangString str_desc_rm_rootdir ${LANG_TURKISH} \
"Vim kök dizinini kaldırır. Bu dizin Vim yapılandırma dosyalarını içerir!"
-
+
LangString str_msg_install_fail ${LANG_TURKISH} \
"Yükleme başarısız oldu. Yeniden deneyin."
LangString str_msg_rm_exe_fail ${LANG_TURKISH} \
"$0 içindeki bazı dosyalar silinemedi!$\r$\n\
Bu dosyaları el ile kaldırmalısınız."
-
+
LangString str_msg_uninstalling ${LANG_TURKISH} \
"Eski sürüm kaldırılıyor..."
diff --git a/pixmaps/gen-inline-pixbufs.sh b/pixmaps/gen-inline-pixbufs.sh
index 8e11a233ca..616c547df2 100644
--- a/pixmaps/gen-inline-pixbufs.sh
+++ b/pixmaps/gen-inline-pixbufs.sh
@@ -3,11 +3,9 @@
prefix=stock_
list=
-for file in "$@"
-do
- name=`echo "$file" | sed 's|-|_|g; s|^.*/||; s|\..*$||'`
+for file in "$@"; do
+ name=$(echo "$file" | sed 's|-|_|g; s|^.*/||; s|\..*$||')
list="$list $prefix$name $file"
done
gdk-pixbuf-csource --raw --static --build-list $list
-
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index d095f6dd81..5ea8319cf0 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
-" Date: Sep 18, 2020
-" Version: 170
+" Date: Aug 16, 2021
+" Version: 171
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
@@ -43,7 +43,7 @@ if exists("s:needspatches")
endfor
endif
-let g:loaded_netrw = "v170"
+let g:loaded_netrw = "v171"
if !exists("s:NOTE")
let s:NOTE = 0
let s:WARNING = 1
@@ -93,7 +93,7 @@ fun! netrw#ErrorMsg(level,msg,errnum)
else
let msg= level.a:msg
endif
- let s:popuperr_id = popup_beval(msg,{})
+ let s:popuperr_id = popup_atcursor(msg,{})
let s:popuperr_text= ""
elseif g:netrw_use_errorwindow
" (default) netrw creates a one-line window to show error/warning
@@ -322,6 +322,7 @@ call s:NetrwInit("g:netrw_banner" , 1)
call s:NetrwInit("g:netrw_browse_split", 0)
call s:NetrwInit("g:netrw_bufsettings" , "noma nomod nonu nobl nowrap ro nornu")
call s:NetrwInit("g:netrw_chgwin" , -1)
+call s:NetrwInit("g:netrw_clipboard" , 1)
call s:NetrwInit("g:netrw_compress" , "gzip")
call s:NetrwInit("g:netrw_ctags" , "ctags")
if exists("g:netrw_cursorline") && !exists("g:netrw_cursor")
@@ -331,6 +332,7 @@ endif
call s:NetrwInit("g:netrw_cursor" , 2)
let s:netrw_usercul = &cursorline
let s:netrw_usercuc = &cursorcolumn
+"call Decho("(netrw) COMBAK: cuc=".&l:cuc." cul=".&l:cul." initialization of s:netrw_cu[cl]")
call s:NetrwInit("g:netrw_cygdrive","/cygdrive")
" Default values - d-g ---------- {{{3
call s:NetrwInit("s:didstarstar",0)
@@ -703,7 +705,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
endif
" save registers
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
" call Decho("(netrw#Explore) save @* and @+",'~'.expand("<slnum>"))
sil! let keepregstar = @*
sil! let keepregplus = @+
@@ -931,7 +933,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
" call Decho("..case Nexplore with starpat=".starpat.": (indx=".indx.")",'~'.expand("<slnum>"))
if !exists("w:netrw_explore_list") " sanity check
NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or <s-down> improperly; see help for netrw-starstar",40)
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
if @* != keepregstar | sil! let @* = keepregstar | endif
if @+ != keepregplus | sil! let @+ = keepregplus | endif
@@ -957,7 +959,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
" call Decho("case Pexplore with starpat=".starpat.": (indx=".indx.")",'~'.expand("<slnum>"))
if !exists("w:netrw_explore_list") " sanity check
NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or <s-up> improperly; see help for netrw-starstar",41)
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
if @* != keepregstar | sil! let @* = keepregstar | endif
if @+ != keepregplus | sil! let @+ = keepregplus | endif
@@ -1013,7 +1015,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
catch /^Vim\%((\a\+)\)\=:E480/
keepalt call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45)
if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
if @* != keepregstar | sil! let @* = keepregstar | endif
if @+ != keepregplus | sil! let @+ = keepregplus | endif
@@ -1050,7 +1052,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/')
keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"no files matched",42)
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
if @* != keepregstar | sil! let @* = keepregstar | endif
if @+ != keepregplus | sil! let @+ = keepregplus | endif
@@ -1099,7 +1101,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
if !exists("g:netrw_quiet")
keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44)
endif
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
if @* != keepregstar | sil! let @* = keepregstar | endif
if @+ != keepregplus | sil! let @+ = keepregplus | endif
@@ -1173,7 +1175,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
" there's no danger of a late FocusGained event on initialization.
" Consequently, set s:netrw_events to 2.
let s:netrw_events= 2
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
if @* != keepregstar | sil! let @* = keepregstar | endif
if @+ != keepregplus | sil! let @+ = keepregplus | endif
@@ -1641,7 +1643,8 @@ endfun
fun! s:NetrwOptionsSave(vt)
" call Dfunc("s:NetrwOptionsSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma)
" call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"),'~'.expand("<slnum>"))
-" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt." hid=".&hid,'~'.expand("<slnum>"))
+" call Decho("(s:NetrwOptionsSave) lines=".&lines)
if !exists("{a:vt}netrw_optionsave")
let {a:vt}netrw_optionsave= 1
@@ -1667,6 +1670,9 @@ fun! s:NetrwOptionsSave(vt)
let {a:vt}netrw_cinokeep = &l:cino
let {a:vt}netrw_comkeep = &l:com
let {a:vt}netrw_cpokeep = &l:cpo
+ let {a:vt}netrw_cuckeep = &l:cuc
+ let {a:vt}netrw_culkeep = &l:cul
+" call Decho("(s:NetrwOptionsSave) COMBAK: cuc=".&l:cuc." cul=".&l:cul)
let {a:vt}netrw_diffkeep = &l:diff
let {a:vt}netrw_fenkeep = &l:fen
if !exists("g:netrw_ffkeep") || g:netrw_ffkeep
@@ -1674,9 +1680,11 @@ fun! s:NetrwOptionsSave(vt)
endif
let {a:vt}netrw_fokeep = &l:fo " formatoptions
let {a:vt}netrw_gdkeep = &l:gd " gdefault
+ let {a:vt}netrw_gokeep = &l:go " guioptions
let {a:vt}netrw_hidkeep = &l:hidden
let {a:vt}netrw_imkeep = &l:im
let {a:vt}netrw_iskkeep = &l:isk
+ let {a:vt}netrw_lines = &lines
let {a:vt}netrw_lskeep = &l:ls
let {a:vt}netrw_makeep = &l:ma
let {a:vt}netrw_magickeep = &l:magic
@@ -1702,12 +1710,13 @@ fun! s:NetrwOptionsSave(vt)
let {a:vt}netrw_dirkeep = getcwd()
" call Decho("saving to ".a:vt."netrw_dirkeep<".{a:vt}netrw_dirkeep.">",'~'.expand("<slnum>"))
endif
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
sil! let {a:vt}netrw_starkeep = @*
sil! let {a:vt}netrw_pluskeep = @+
endif
sil! let {a:vt}netrw_slashkeep= @/
+" call Decho("(s:NetrwOptionsSave) lines=".&lines)
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
" call Dret("s:NetrwOptionsSave : tab#".tabpagenr()." win#".winnr())
endfun
@@ -1732,12 +1741,17 @@ fun! s:NetrwOptionsSafe(islocal)
endif
call s:NetrwSetSafeSetting("&l:ci",0)
call s:NetrwSetSafeSetting("&l:cin",0)
- call s:NetrwSetSafeSetting("&l:bh","hide")
+ if g:netrw_fastbrowse > a:islocal
+ call s:NetrwSetSafeSetting("&l:bh","hide")
+ else
+ call s:NetrwSetSafeSetting("&l:bh","delete")
+ endif
call s:NetrwSetSafeSetting("&l:cino","")
call s:NetrwSetSafeSetting("&l:com","")
if &cpo =~ 'a' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'a','','g')) | endif
if &cpo =~ 'A' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'A','','g')) | endif
setl fo=nroql2
+ call s:NetrwSetSafeSetting("&go","begmr")
call s:NetrwSetSafeSetting("&l:hid",0)
call s:NetrwSetSafeSetting("&l:im",0)
setl isk+=@ isk+=* isk+=/
@@ -1751,7 +1765,10 @@ fun! s:NetrwOptionsSafe(islocal)
call s:NetrwSetSafeSetting("&l:tw",0)
call s:NetrwSetSafeSetting("&l:wig","")
setl cedit&
- call s:NetrwCursor()
+
+ " set up cuc and cul based on g:netrw_cursor and listing style
+ " COMBAK -- cuc cul related
+ call s:NetrwCursor(0)
" allow the user to override safe options
" call Decho("ft<".&ft."> ei=".&ei,'~'.expand("<slnum>"))
@@ -1769,11 +1786,14 @@ endfun
" s:NetrwOptionsRestore: restore options (based on prior s:NetrwOptionsSave) {{{2
fun! s:NetrwOptionsRestore(vt)
" call Dfunc("s:NetrwOptionsRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$"))
+" call Decho("(s:NetrwOptionsRestore) lines=".&lines)
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
if !exists("{a:vt}netrw_optionsave")
" call Decho("case ".a:vt."netrw_optionsave : doesn't exist",'~'.expand("<slnum>"))
-" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Decho("..doing filetype detect anyway")
+ filetype detect
+" call Decho("..settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
+" call Decho("..ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
" call Dret("s:NetrwOptionsRestore : ".a:vt."netrw_optionsave doesn't exist")
return
endif
@@ -1790,41 +1810,53 @@ fun! s:NetrwOptionsRestore(vt)
endif
endif
endif
+" call Decho("(s:NetrwOptionsRestore) #1 lines=".&lines)
call s:NetrwRestoreSetting(a:vt."netrw_aikeep","&l:ai")
call s:NetrwRestoreSetting(a:vt."netrw_awkeep","&l:aw")
call s:NetrwRestoreSetting(a:vt."netrw_blkeep","&l:bl")
call s:NetrwRestoreSetting(a:vt."netrw_btkeep","&l:bt")
call s:NetrwRestoreSetting(a:vt."netrw_bombkeep","&l:bomb")
+" call Decho("(s:NetrwOptionsRestore) #2 lines=".&lines)
call s:NetrwRestoreSetting(a:vt."netrw_cedit","&cedit")
call s:NetrwRestoreSetting(a:vt."netrw_cikeep","&l:ci")
call s:NetrwRestoreSetting(a:vt."netrw_cinkeep","&l:cin")
call s:NetrwRestoreSetting(a:vt."netrw_cinokeep","&l:cino")
call s:NetrwRestoreSetting(a:vt."netrw_comkeep","&l:com")
+" call Decho("(s:NetrwOptionsRestore) #3 lines=".&lines)
call s:NetrwRestoreSetting(a:vt."netrw_cpokeep","&l:cpo")
call s:NetrwRestoreSetting(a:vt."netrw_diffkeep","&l:diff")
call s:NetrwRestoreSetting(a:vt."netrw_fenkeep","&l:fen")
if exists("g:netrw_ffkeep") && g:netrw_ffkeep
call s:NetrwRestoreSetting(a:vt."netrw_ffkeep")","&l:ff")
endif
- call s:NetrwRestoreSetting(a:vt."netrw_fokeep","&l:fo")
- call s:NetrwRestoreSetting(a:vt."netrw_gdkeep","&l:gd")
- call s:NetrwRestoreSetting(a:vt."netrw_hidkeep","&l:hidden")
- call s:NetrwRestoreSetting(a:vt."netrw_imkeep","&l:im")
- call s:NetrwRestoreSetting(a:vt."netrw_iskkeep","&l:isk")
- call s:NetrwRestoreSetting(a:vt."netrw_lskeep","&l:ls")
- call s:NetrwRestoreSetting(a:vt."netrw_makeep","&l:ma")
+" call Decho("(s:NetrwOptionsRestore) #4 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_fokeep" ,"&l:fo")
+ call s:NetrwRestoreSetting(a:vt."netrw_gdkeep" ,"&l:gd")
+ call s:NetrwRestoreSetting(a:vt."netrw_gokeep" ,"&l:go")
+ call s:NetrwRestoreSetting(a:vt."netrw_hidkeep" ,"&l:hidden")
+" call Decho("(s:NetrwOptionsRestore) #5 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_imkeep" ,"&l:im")
+ call s:NetrwRestoreSetting(a:vt."netrw_iskkeep" ,"&l:isk")
+" call Decho("(s:NetrwOptionsRestore) #6 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_lines" ,"&lines")
+" call Decho("(s:NetrwOptionsRestore) #7 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_lskeep" ,"&l:ls")
+ call s:NetrwRestoreSetting(a:vt."netrw_makeep" ,"&l:ma")
call s:NetrwRestoreSetting(a:vt."netrw_magickeep","&l:magic")
- call s:NetrwRestoreSetting(a:vt."netrw_modkeep","&l:mod")
- call s:NetrwRestoreSetting(a:vt."netrw_nukeep","&l:nu")
- call s:NetrwRestoreSetting(a:vt."netrw_rnukeep","&l:rnu")
- call s:NetrwRestoreSetting(a:vt."netrw_repkeep","&l:report")
- call s:NetrwRestoreSetting(a:vt."netrw_rokeep","&l:ro")
- call s:NetrwRestoreSetting(a:vt."netrw_selkeep","&l:sel")
+ call s:NetrwRestoreSetting(a:vt."netrw_modkeep" ,"&l:mod")
+ call s:NetrwRestoreSetting(a:vt."netrw_nukeep" ,"&l:nu")
+" call Decho("(s:NetrwOptionsRestore) #8 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_rnukeep" ,"&l:rnu")
+ call s:NetrwRestoreSetting(a:vt."netrw_repkeep" ,"&l:report")
+ call s:NetrwRestoreSetting(a:vt."netrw_rokeep" ,"&l:ro")
+ call s:NetrwRestoreSetting(a:vt."netrw_selkeep" ,"&l:sel")
+" call Decho("(s:NetrwOptionsRestore) #9 lines=".&lines)
call s:NetrwRestoreSetting(a:vt."netrw_spellkeep","&l:spell")
- call s:NetrwRestoreSetting(a:vt."netrw_twkeep","&l:tw")
- call s:NetrwRestoreSetting(a:vt."netrw_wigkeep","&l:wig")
- call s:NetrwRestoreSetting(a:vt."netrw_wrapkeep","&l:wrap")
+ call s:NetrwRestoreSetting(a:vt."netrw_twkeep" ,"&l:tw")
+ call s:NetrwRestoreSetting(a:vt."netrw_wigkeep" ,"&l:wig")
+ call s:NetrwRestoreSetting(a:vt."netrw_wrapkeep" ,"&l:wrap")
call s:NetrwRestoreSetting(a:vt."netrw_writekeep","&l:write")
+" call Decho("(s:NetrwOptionsRestore) #10 lines=".&lines)
call s:NetrwRestoreSetting("s:yykeep","@@")
" former problem: start with liststyle=0; press <i> : result, following line resets l:ts.
" Fixed; in s:PerformListing, when w:netrw_liststyle is s:LONGLIST, will use a printf to pad filename with spaces
@@ -1855,7 +1887,7 @@ fun! s:NetrwOptionsRestore(vt)
unlet {a:vt}netrw_dirkeep
endif
endif
- if has("clipboard")
+ if has("clipboard") && g:netrw_clipboard
" call Decho("has clipboard",'~'.expand("<slnum>"))
call s:NetrwRestoreSetting(a:vt."netrw_starkeep","@*")
call s:NetrwRestoreSetting(a:vt."netrw_pluskeep","@+")
@@ -1871,9 +1903,11 @@ fun! s:NetrwOptionsRestore(vt)
" were having their filetype detect-generated settings overwritten by
" NetrwOptionRestore.
if &ft != "netrw"
-" call Decho("filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
+" call Decho("before: filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
filetype detect
+" call Decho("after : filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
endif
+" call Decho("(s:NetrwOptionsRestore) lines=".&lines)
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
" call Dret("s:NetrwOptionsRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
endfun
@@ -1923,7 +1957,7 @@ fun! s:NetrwRestoreSetting(keepvar,setting)
" typically called from s:NetrwOptionsRestore
" call s:NetrwRestoreSettings(keep-option-variable-name,'associated-option')
" ex. call s:NetrwRestoreSetting(a:vt."netrw_selkeep","&l:sel")
- " Restores option (if different) from a keepvar
+ " Restores option (but only if different) from a:keepvar
if exists(a:keepvar)
exe "let keepvarval= ".a:keepvar
exe "let setting= ".a:setting
@@ -2845,14 +2879,16 @@ fun! netrw#SetTreetop(iscmd,...)
" call Decho("inittreetop<".(exists("inittreetop")? inittreetop : "n/a").">")
if (a:iscmd == 0 || a:1 == "") && exists("inittreetop")
- let treedir= s:NetrwTreePath(inittreetop)
+ let treedir = s:NetrwTreePath(inittreetop)
" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
else
if isdirectory(s:NetrwFile(a:1))
" call Decho("a:1<".a:1."> is a directory",'~'.expand("<slnum>"))
- let treedir= a:1
+ let treedir = a:1
+ let s:netrw_treetop = treedir
elseif exists("b:netrw_curdir") && (isdirectory(s:NetrwFile(b:netrw_curdir."/".a:1)) || a:1 =~ '^\a\{3,}://')
- let treedir= b:netrw_curdir."/".a:1
+ let treedir = b:netrw_curdir."/".a:1
+ let s:netrw_treetop = treedir
" call Decho("a:1<".a:1."> is NOT a directory, using treedir<".treedir.">",'~'.expand("<slnum>"))
else
" normally the cursor is left in the message window.
@@ -2860,7 +2896,8 @@ fun! netrw#SetTreetop(iscmd,...)
let netrwbuf= bufnr("%")
call netrw#ErrorMsg(s:ERROR,"sorry, ".a:1." doesn't seem to be a directory!",95)
exe bufwinnr(netrwbuf)."wincmd w"
- let treedir= "."
+ let treedir = "."
+ let s:netrw_treetop = getcwd()
endif
endif
" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
@@ -4115,6 +4152,7 @@ fun! s:NetrwFileInfo(islocal,fname)
elseif g:netrw_sizestyle =~# 'h'
let lsopt= "-lsadh --si"
endif
+" call Decho("(s:NetrwFileInfo) lsopt<".lsopt.">")
if (has("unix") || has("macunix")) && executable("/bin/ls")
if getline(".") == "../"
@@ -4176,9 +4214,10 @@ endfun
" s:NetrwGetBuffer: [get a new|find an old netrw] buffer for a netrw listing {{{2
" returns 0=cleared buffer
" 1=re-used buffer (buffer not cleared)
+" Nov 09, 2020: tst952 shows that when user does :set hidden that NetrwGetBuffer will come up with a [No Name] buffer (hid fix)
fun! s:NetrwGetBuffer(islocal,dirname)
" call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle)
-" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." hid=".&hid,'~'.expand("<slnum>"))
" call Decho("netrwbuf dictionary=".(exists("s:netrwbuf")? string(s:netrwbuf) : 'n/a'),'~'.expand("<slnum>"))
" call Dredir("ls!","s:NetrwGetBuffer")
let dirname= a:dirname
@@ -4228,17 +4267,26 @@ fun! s:NetrwGetBuffer(islocal,dirname)
endif
" call Decho(" bufnum#".bufnum,'~'.expand("<slnum>"))
- " highjack the current buffer if
- " it has the desired name
- " it is empty
-" call Decho("deciding if I can highjack the current buffer#".bufnr("%"),'~'.expand("<slnum>"))
-" call Decho("..dirname<".dirname.">",'~'.expand("<slnum>"))
-" call Decho("..bufname<".bufname("%").">",'~'.expand("<slnum>"))
-" call Decho("..getline($)<".getline("$").">",'~'.expand("<slnum>"))
- if dirname == bufname("%") && line("$") == 1 && getline("%") == ""
+ " highjack the current buffer
+ " IF the buffer already has the desired name
+ " AND it is empty
+ let curbuf = bufname("%")
+ if curbuf == '.'
+ let curbuf = getcwd()
+ endif
+" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)")
+" call Decho("deciding if netrw may highjack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("<slnum>"))
+" call Decho("..dirname<".dirname."> IF dirname == bufname",'~'.expand("<slnum>"))
+" call Decho("..curbuf<".curbuf.">",'~'.expand("