Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package vim-plugins for openSUSE:Factory 
checked in at 2022-11-08 10:55:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vim-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.vim-plugins.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "vim-plugins"

Tue Nov  8 10:55:10 2022 rev:45 rq:1034424 version:unknown

Changes:
--------
--- /work/SRC/openSUSE:Factory/vim-plugins/vim-plugins.changes  2022-10-27 
13:55:07.928861262 +0200
+++ /work/SRC/openSUSE:Factory/.vim-plugins.new.1597/vim-plugins.changes        
2022-11-08 10:56:14.325951132 +0100
@@ -1,0 +2,7 @@
+Tue Nov  8 07:00:33 UTC 2022 - Jiri Slaby <jsl...@suse.cz>
+
+- add salt-syntax-avoid-multiline-lets.patch (bsc#1205034)
+- update
+  * NERDcommenter  2.7.0
+
+-------------------------------------------------------------------

Old:
----
  vimplugin-NERDcommenter-2.6.0.tar.gz

New:
----
  salt-syntax-avoid-multiline-lets.patch
  vimplugin-NERDcommenter-2.7.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ vim-plugins.spec ++++++
--- /var/tmp/diff_new_pack.JTU7V1/_old  2022-11-08 10:56:15.345953532 +0100
+++ /var/tmp/diff_new_pack.JTU7V1/_new  2022-11-08 10:56:15.349953542 +0100
@@ -39,7 +39,7 @@
 %define minibufexpl_version    6.3.2
 %define multiplesearch_version 1.3
 %define neomutt_version                20220612
-%define NERDcommenter_version  2.6.0
+%define NERDcommenter_version  2.7.0
 %define NERDtree_version       6.10.16
 %define project_version                1.4.1
 %define quilt_version          0.9.7
@@ -108,6 +108,7 @@
 Source200:      gitrebase.vim
 Source1000:     
https://raw.githubusercontent.com/openSUSE/pack-tools/master/contrib/vim/spec.snippets
 Source1001:     check_for_updates.pl
+Patch0:         salt-syntax-avoid-multiline-lets.patch
 Patch1:         locateopen-1.3-locate-support.patch
 Patch2:         showmarks-signs.patch
 Patch3:         file-line-Fix-other-plugins-loading.patch
@@ -663,6 +664,9 @@
 
 %prep
 %setup -q -c -n %{name} -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a9 -a10 -a11 -a12 -a13 
-a14 -a15 -a16 -a17 -a18 -a19 -a20 -a21 -a22 -a23 -a24 -a26 -a27 -a28 -a30 -a31 
-a32 -a33 -a34 -a35 -a100 -a101 -a102 -a103 -a104
+pushd salt-vim-%{salt_version}
+%patch0 -p1
+popd
 # ------- patch locateopen ------
 pushd LocateOpen-%locateopen_version
 %patch1

++++++ salt-syntax-avoid-multiline-lets.patch ++++++
From: Jiri Slaby <jsl...@suse.cz>
Date: Tue, 8 Nov 2022 07:57:01 +0100
Subject: syntax: avoid multiline lets
Patch-mainline: not yet
References: bsc#1205034

They are not allowed anymore.

Signed-off-by: Jiri Slaby <jsl...@suse.cz>
---
 syntax/sls.vim | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/syntax/sls.vim b/syntax/sls.vim
index 18fc4875..481e8376 100644
--- a/syntax/sls.vim
+++ b/syntax/sls.vim
@@ -64,8 +64,6 @@ highlight link salt_stateSpecialArgs Special
 syn keyword salt_stateErrors requires requires_in watches watches_in includes 
extends containedin=yamlBlockMappingKey
 highlight link salt_stateErrors Error
 
-let g:NERDCustomDelimiters = {
-  \ 'sls': { 'left': '#' },
-\ }
+let g:NERDCustomDelimiters = { 'sls': { 'left': '#' }, }
 
 let b:current_syntax = "sls"
-- 
2.35.3


++++++ vimplugin-NERDcommenter-2.6.0.tar.gz -> 
vimplugin-NERDcommenter-2.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nerdcommenter-2.6.0/CHANGELOG.md 
new/nerdcommenter-2.7.0/CHANGELOG.md
--- old/nerdcommenter-2.6.0/CHANGELOG.md        2021-11-27 05:22:42.000000000 
+0100
+++ new/nerdcommenter-2.7.0/CHANGELOG.md        2022-11-05 10:34:59.000000000 
+0100
@@ -1,5 +1,12 @@
 # Changelog
 
+### 2.7.0
+
+* Support for many more filetypes
+* Sort out race condition when using utility functions directly
+* Fixup undo support when commenting results in cursor moves
+* Refactor comment insertion code
+
 ### 2.6.0
 
 * Refactor code to run as autoload plugin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nerdcommenter-2.6.0/README.md 
new/nerdcommenter-2.7.0/README.md
--- old/nerdcommenter-2.6.0/README.md   2021-11-27 05:22:42.000000000 +0100
+++ new/nerdcommenter-2.7.0/README.md   2022-11-05 10:34:59.000000000 +0100
@@ -201,8 +201,8 @@
 
 While the plugin does not directly support motions, you can leverage its 
support for selections to do something very similar. For example, to add 
motions to toggle comments on the paragraph text object you could use:
 ```vim
-nnoremap <silent> <leader>c} V}:call NERDComment('x', 'toggle')<CR>
-nnoremap <silent> <leader>c{ V{:call NERDComment('x', 'toggle')<CR>
+nnoremap <silent> <leader>c} V}:call nerdcommenter#Comment('x', 'toggle')<CR>
+nnoremap <silent> <leader>c{ V{:call nerdcommenter#Comment('x', 'toggle')<CR>
 ```
 
 ## Contributions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nerdcommenter-2.6.0/autoload/nerdcommenter.vim 
new/nerdcommenter-2.7.0/autoload/nerdcommenter.vim
--- old/nerdcommenter-2.6.0/autoload/nerdcommenter.vim  2021-11-27 
05:22:42.000000000 +0100
+++ new/nerdcommenter-2.7.0/autoload/nerdcommenter.vim  2022-11-05 
10:34:59.000000000 +0100
@@ -33,6 +33,7 @@
     \ 'asterisk': { 'left': ';' },
     \ 'asy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
     \ 'atlas': { 'left': 'C', 'right': '$' },
+    \ 'ats': { 'left': '//', 'leftAlt': '(*', 'rightAlt': '*)' },
     \ 'augeas': { 'left': '(*', 'right': '*)' },
     \ 'autohotkey': { 'left': ';', 'leftAlt': '/*', 'rightAlt': '*/' },
     \ 'autoit': { 'left': ';' },
@@ -49,6 +50,7 @@
     \ 'btm': { 'left': '::' },
     \ 'c': { 'left': '/*', 'right': '*/', 'leftAlt': '//' },
     \ 'cabal': { 'left': '--' },
+    \ 'cairo': { 'left': '#' },
     \ 'calibre': { 'left': '//' },
     \ 'caos': { 'left': '*' },
     \ 'catalog': { 'left': '--', 'right': '--' },
@@ -193,12 +195,14 @@
     \ 'jsonnet': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
     \ 'jsp': { 'left': '<%--', 'right': '--%>' },
     \ 'julia': { 'left': '# ', 'leftAlt': '#=', 'rightAlt': '=#' },
+    \ 'just' : { 'left': '#' },
     \ 'kivy': { 'left': '#' },
     \ 'kix': { 'left': ';' },
     \ 'kscript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
     \ 'lace': { 'left': '--' },
     \ 'laravel': { 'left': '{{--', 'right': '--}}' },
     \ 'ldif': { 'left': '#' },
+    \ 'lean': { 'left': '--', 'leftAlt': '/-', 'rightAlt': '-/' },
     \ 'ledger': { 'left': '#', 'leftAlt': ';' },
     \ 'less': { 'left': '/*', 'right': '*/' },
     \ 'lhaskell': { 'left': '>{-', 'right': '-}', 'leftAlt': '>-- ' },
@@ -342,7 +346,7 @@
     \ 'sh': { 'left': '#' },
     \ 'shader_test': { 'left': '#' },
     \ 'sicad': { 'left': '*' },
-    \ 'sile': { 'left': '%' },
+    \ 'sile': { 'left': '%', 'leftAlt': '--' },
     \ 'simula': { 'left': '%', 'leftAlt': '--' },
     \ 'sinda': { 'left': '$' },
     \ 'skill': { 'left': ';' },
@@ -379,6 +383,7 @@
     \ 'stan': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
     \ 'stp': { 'left': '/*', 'right': '*/', 'leftAlt': '//' },
     \ 'supercollider': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
+    \ 'svelte': { 'left': '<!--', 'right': '-->' },
     \ 'swift': { 'left': '/*', 'right': '*/', 'leftAlt': '//' },
     \ 'systemverilog': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
     \ 'tads': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
@@ -393,6 +398,7 @@
     \ 'texmf': { 'left': '%' },
     \ 'tf': { 'left': '#' },
     \ 'tidy': { 'left': '#' },
+    \ 'tla': { 'left': '\\*', 'leftAlt': '(*', 'rightAlt': '*)' },
     \ 'tli': { 'left': '#' },
     \ 'tmux': { 'left': '#' },
     \ 'toml': { 'left': '#' },
@@ -436,7 +442,8 @@
     \ 'xpm2': { 'left': '!' },
     \ 'xquery': { 'left': '(:', 'right': ':)' },
     \ 'yaml': { 'left': '#' },
-    \ 'z8a': { 'left': ';' }
+    \ 'z8a': { 'left': ';' },
+    \ 'zig': { 'left': '//' }
     \ }
 
 let g:NERDDelimiterMap = s:delimiterMap
@@ -1153,6 +1160,7 @@
 "   -lineNo:    the line number of the line to check
 " Return: Number, 1 if the line is a comment, 0 else
 function! nerdcommenter#IsLineCommented(lineNo) abort
+    call nerdcommenter#SetUp()
     let theLine = getline(a:lineNo)
     return s:IsInSexyComment(a:lineNo) || 
s:IsCommentedFromStartOfLine(s:Left(), theLine) || 
s:IsCommentedFromStartOfLine(s:Left({'alt': 1}), theLine)
 endfunction
@@ -1419,46 +1427,20 @@
     let left = s:Left({'space': 1})
     let right = s:Right({'space': 1})
 
-    let theLine = getline('.')
-    let lineHasLeadTabs = s:HasLeadingTabs(theLine) || (theLine =~# '^ *$' && 
!&expandtab)
-
-    "convert tabs to spaces and adjust the cursors column to take this into
-    "account
-    let untabbedCol = s:UntabbedCol(theLine, col('.'))
-    call setline(line('.'), s:ConvertLeadingTabsToSpaces(theLine))
-    call cursor(line('.'), untabbedCol)
-
-    " get the length of the right delimiter
-    let lenRight = strlen(right)
-
-    let isDelimOnEOL = col('.') >= strlen(getline('.'))
-
-    " if the cursor is in the first col then we gotta insert rather than
-    " append the comment delimiters here
-    let insOrApp = (col('.')==1 ? 'i' : 'a')
-
-    " place the delimiters down. We do it differently depending on whether
-    " there is a left AND right delimiter
-    if lenRight > 0
-        execute ':normal! ' . insOrApp . left . right
-        execute ':normal! ' . lenRight . 'h'
-    else
-        execute ':normal! ' . insOrApp . left
-    endif
-
-    "if needed convert spaces back to tabs and adjust the cursors col
-    "accordingly
-    if lineHasLeadTabs
-        let tabbedCol = s:TabbedCol(getline('.'), col('.'))
-        call setline(line('.'), s:ConvertLeadingSpacesToTabs(getline('.')))
-        call cursor(line('.'), tabbedCol)
-    endif
-
-    if isDelimOnEOL && lenRight ==# 0
-        startinsert!
-    else
-        call feedkeys('a', 'ni')
-    endif
+    " 0. Entered insert normal mode using <C-\><C-O> (:h i_CTRL-\_CTRL-O) to
+    "    maintain the cursor position (from <Plug>NERDCommenterInsert).
+    " 1. Enter insert mode without changing the cursor position.
+    "    If the cursor is on EOL (right of the last char), use 'a'.
+    "    Otherwise, use 'i'.
+    let insert = col('.') > strlen(getline('.')) ? 'a' : 'i'
+    " 2. Insert comment delimiters.
+    " 3. Move the cursor to the left of the closing delimiter, without
+    "    breaking undo sequence.
+    " 4. Enter insert normal mode again without changing the cursor position.
+    "    This ensures that returning to the insert mode after finishing the
+    "    script execution does not move the cursor.
+    "                 ( 1  )   (    2     )   (                   3            
       )   (      4     )
+    execute 'normal!' insert . left . right . repeat("\<C-G>U\<Left>", 
strchars(right)) . "\<C-\>\<C-O>"
 endfunction
 
 " Function: s:RemoveDelimiters(left, right, line)
@@ -3019,18 +3001,6 @@
     return line
 endfunction
 
-" Function: s:TabbedCol(line, col)
-" Gets the col number for given line and existing col number. The new col
-" number is the col number when all leading spaces are converted to tabs
-" Args:
-"   -line:the line to get the rel col for
-"   -col: the abs col
-function! s:TabbedCol(line, col) abort
-    let lineTruncated = strpart(a:line, 0, a:col)
-    let lineSpacesToTabs = substitute(lineTruncated, s:TabSpace(), '\t', 'g')
-    return strlen(lineSpacesToTabs)
-endfunction
-
 "FUNCTION: s:TabSpace()
 "returns a string of spaces equal in length to &tabstop
 function! s:TabSpace() abort
@@ -3051,15 +3021,3 @@
 function! s:UnEsc(str, escChar) abort
     return substitute(a:str, a:escChar, '', 'g')
 endfunction
-
-" Function: s:UntabbedCol(line, col)
-" Takes a line and a col and returns the absolute column of col taking into
-" account that a tab is worth 3 or 4 (or whatever) spaces.
-" Args:
-"   -line:the line to get the abs col for
-"   -col: the col that doesn't take into account tabs
-function! s:UntabbedCol(line, col) abort
-    let lineTruncated = strpart(a:line, 0, a:col)
-    let lineTabsToSpaces = substitute(lineTruncated, '\t', s:TabSpace(), 'g')
-    return strlen(lineTabsToSpaces)
-endfunction
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nerdcommenter-2.6.0/plugin/nerdcommenter.vim 
new/nerdcommenter-2.7.0/plugin/nerdcommenter.vim
--- old/nerdcommenter-2.6.0/plugin/nerdcommenter.vim    2021-11-27 
05:22:42.000000000 +0100
+++ new/nerdcommenter-2.7.0/plugin/nerdcommenter.vim    2022-11-05 
10:34:59.000000000 +0100
@@ -125,7 +125,7 @@
     return nerdcommenter#IsCharCommented(a:line, a:col)
 endfunction
 
-inoremap <silent> <Plug>NERDCommenterInsert <Space><BS><Esc>:call 
nerdcommenter#Comment('i', "insert")<CR>
+inoremap <silent> <Plug>NERDCommenterInsert <C-\><C-O>:call 
nerdcommenter#Comment('i', "Insert")<CR>
 
 " switch to/from alternative delimiters (does not use wrapper function)
 nnoremap <Plug>NERDCommenterAltDelims :call 
nerdcommenter#SwitchToAlternativeDelimiters(1)<CR>

Reply via email to