Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tabsidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
rbtnn committed Aug 4, 2024
2 parents 7845095 + f5f69e8 commit 1b1a372
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 17 deletions.
5 changes: 3 additions & 2 deletions runtime/autoload/zip.vim
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
" 2024 Jul 23 by Vim Project: fix 'x' command
" 2024 Jul 24 by Vim Project: use delete() function
" 2024 Jul 20 by Vim Project: fix opening remote zipfile
" 2024 Aug 04 by Vim Project: escape '[' in name of file to be extracted
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
Expand Down Expand Up @@ -218,8 +219,8 @@ fun! zip#Read(fname,mode)
else
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
let fname = substitute(fname, '[', '[[]', 'g')
endif
let fname = substitute(fname, '[', '[[]', 'g')
" sanity check
if !executable(substitute(g:zip_unzipcmd,'\s\+.*$','',''))
redraw!
Expand All @@ -230,7 +231,7 @@ fun! zip#Read(fname,mode)
endif

" the following code does much the same thing as
" exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
" exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
" but allows zipfile://... entries in quickfix lists
let temp = tempname()
let fn = expand('%:p')
Expand Down
7 changes: 5 additions & 2 deletions runtime/doc/vim-it.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH VIM 1 "4 giugno 2024"
.TH VIM 1 "3 agosto 2024"
.SH NOME
vim \- VI Migliorato, un editor di testi per programmatori
.SH SINTASSI
Expand Down Expand Up @@ -434,7 +434,10 @@ Se il file {script_file} esiste, il testo immesso viene aggiunto in fondo.
Come \-w, ma uno script file esistente viene sovrascritto.
.TP
\-x
Uso di cifratura nella scrittura dei file. Verrà chiesta una chiave di cifratura.
Se
.B Vim
è stato compilato con il supporto per la cifratura, usare cifratura
nella scrittura dei file. Verrà chiesta una chiave di cifratura.
.TP
\-X
Non connettersi al server X. Vim parte più rapidamente,
Expand Down
7 changes: 5 additions & 2 deletions runtime/doc/vim-it.UTF-8.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH VIM 1 "4 giugno 2024"
.TH VIM 1 "3 agosto 2024"
.SH NOME
vim \- VI Migliorato, un editor di testi per programmatori
.SH SINTASSI
Expand Down Expand Up @@ -434,7 +434,10 @@ Se il file {script_file} esiste, il testo immesso viene aggiunto in fondo.
Come \-w, ma uno script file esistente viene sovrascritto.
.TP
\-x
Uso di cifratura nella scrittura dei file. Verrà chiesta una chiave di cifratura.
Se
.B Vim
è stato compilato con il supporto per la cifratura, usare cifratura
nella scrittura dei file. Verrà chiesta una chiave di cifratura.
.TP
\-X
Non connettersi al server X. Vim parte più rapidamente,
Expand Down
9 changes: 5 additions & 4 deletions runtime/indent/lua.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
" First Author: Max Ischenko <mfi 'at' ukr.net>
" Last Change: 2017 Jun 13
" 2022 Sep 07: b:undo_indent added by Doug Kearns
" 2024 Jul 27: by Vim project: match '(', ')' in function GetLuaIndentIntern()

" Only load this indent file when no other was loaded.
if exists("b:did_indent")
Expand Down Expand Up @@ -46,12 +47,12 @@ function! GetLuaIndentIntern()
endif

" Add a 'shiftwidth' after lines that start a block:
" 'function', 'if', 'for', 'while', 'repeat', 'else', 'elseif', '{'
" 'function', 'if', 'for', 'while', 'repeat', 'else', 'elseif', '{', '('
let ind = indent(prevlnum)
let prevline = getline(prevlnum)
let midx = match(prevline, '^\s*\%(if\>\|for\>\|while\>\|repeat\>\|else\>\|elseif\>\|do\>\|then\>\)')
if midx == -1
let midx = match(prevline, '{\s*\%(--\%([^[].*\)\?\)\?$')
let midx = match(prevline, '\%({\|(\)\s*\%(--\%([^[].*\)\?\)\?$')
if midx == -1
let midx = match(prevline, '\<function\>\s*\%(\k\|[.:]\)\{-}\s*(')
endif
Expand All @@ -65,9 +66,9 @@ function! GetLuaIndentIntern()
endif
endif

" Subtract a 'shiftwidth' on end, else, elseif, until and '}'
" Subtract a 'shiftwidth' on end, else, elseif, until, '}' and ')'
" This is the part that requires 'indentkeys'.
let midx = match(getline(v:lnum), '^\s*\%(end\>\|else\>\|elseif\>\|until\>\|}\)')
let midx = match(getline(v:lnum), '^\s*\%(end\>\|else\>\|elseif\>\|until\>\|}\|)\)')
if midx != -1 && synIDattr(synID(v:lnum, midx + 1, 1), "name") != "luaComment"
let ind = ind - shiftwidth()
endif
Expand Down
19 changes: 19 additions & 0 deletions runtime/indent/testdir/lua.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- vim: set ft=lua sw=2 noet:

-- START_INDENT
function foo(a, b, c, d)
return { a, b, c, d }
end

local a = foo(
1,
2,
"longxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
4
)

local b = {
1,
2,
}
-- END_INDENT
19 changes: 19 additions & 0 deletions runtime/indent/testdir/lua.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- vim: set ft=lua sw=2 noet:

-- START_INDENT
function foo(a, b, c, d)
return { a, b, c, d }
end

local a = foo(
1,
2,
"longxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
4
)

local b = {
1,
2,
}
-- END_INDENT
21 changes: 14 additions & 7 deletions src/Make_mvc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,11 @@ RM = del /f /q

# Read MAJOR and MINOR from version.h.
!IF ![for /f "tokens=2,3" %I in (version.h) do \
@if "%I"=="VIM_VERSION_MAJOR" ( echo MAJOR=%J>.\major.tmp ) \
else if "%I"=="VIM_VERSION_MINOR" ( echo MINOR=%J>.\minor.tmp )]
@if "%I"=="VIM_VERSION_MAJOR" ( \
echo MAJOR=%J> .\major.tmp \
) else if "%I"=="VIM_VERSION_MINOR" ( \
echo MINOR=%J> .\minor.tmp && exit \
)]
!ENDIF

!IF EXIST(.\major.tmp)
Expand All @@ -189,11 +192,15 @@ MINOR = 1
!ENDIF

# Read PATCHLEVEL from version.c.
!IF ![cmd.exe /V:ON /C "echo off && set LINE=0&& set FIND=0&& \
for /f "tokens=1,3 delims=,[ " %I in (version.c) do \
( set /A LINE+=1 > NUL && \
if "%J"=="included_patches" ( set /A FIND=LINE+3 > NUL ) \
else if "!LINE!"=="!FIND!" ( echo PATCHLEVEL=%I>.\patchlvl.tmp && exit ) )"]
!IF ![cmd.exe /V:ON /Q /C "set LINE=0&& set FIND=0&& \
for /f "tokens=1,3 delims=, " %I in (version.c) do ( \
set /A LINE+=1 > NUL && \
if "%J"=="included_patches[^]" ( \
set /A FIND=LINE+3 > NUL \
) else if "!LINE!"=="!FIND!" ( \
echo PATCHLEVEL=%I> .\patchlvl.tmp && exit \
) \
)"]
!ENDIF
!IF EXIST(.\patchlvl.tmp)
! INCLUDE .\patchlvl.tmp
Expand Down
7 changes: 7 additions & 0 deletions src/os_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,13 @@ decode_key_event(
}
}
}
else if (pker->wVirtualKeyCode == VK_INSERT
&& (nModifs & SHIFT) != 0
&& (nModifs & ~SHIFT) == 0)
{
*pmodifiers = 0;
*pch2 = VirtKeyMap[i].chShift;
}
else
{
*pch2 = VirtKeyMap[i].chAlone;
Expand Down
4 changes: 4 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,10 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
660,
/**/
659,
/**/
658,
/**/
Expand Down

0 comments on commit 1b1a372

Please sign in to comment.