Re: Patch 8.2.5003

2022-05-22 Fir de Conversatie Ernie Rael
On 5/22/22 7:10 PM, Yegappan Lakshmanan wrote: Hi, On Sun, May 22, 2022 at 11:14 AM Bram Moolenaar wrote: Patch 8.2.5003 Problem:Cannot do bitwise shifts. Solution: Add the >> and << operators. (Yegappan Lakshmanan, closes #8457) Now that we have the support for the bitwise shift opera

Re: Patch 8.2.5003

2022-05-22 Fir de Conversatie Yegappan Lakshmanan
Hi, On Sun, May 22, 2022 at 11:14 AM Bram Moolenaar wrote: > > Patch 8.2.5003 > Problem:Cannot do bitwise shifts. > Solution: Add the >> and << operators. (Yegappan Lakshmanan, closes #8457) > Now that we have the support for the bitwise shift operators, should we add the support for the b

Re: [vim/vim] formatoptions+=r continues a // comment that isn't at the start of the line (Issue #10006)

2022-05-22 Fir de Conversatie Gary Johnson
On 2022-05-22, Terry Greeniaus wrote: > If I came across as confrontational I apologize. I am comforted to > know that I will only have to keep my .vimrc up to date rather > than carry around other files with me as well. > @vim-ml, I find it odd to say it's a fix when the behaviour for as > long

Patch 8.2.5006

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.5006 (after 8.2.5003) Problem:Asan warns for undefined behavior. Solution: Cast the shifted value to unsigned. Files: src/eval.c, src/vim9expr.c, src/vim9execute.c *** ../vim-8.2.5005/src/eval.c 2022-05-22 20:16:28.857115519 +0100 --- src/eval.c 2022-05-22 22:02:43.347884

Patch 8.2.5005

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.5005 (after 8.2.5003) Problem:Compiler warning for uninitialized variable. (John Marriott) Solution: Initialize the pointer to NULL. Files: src/vim9expr.vim *** ../vim-8.2.5004/src/vim9expr.c 2022-05-22 20:16:28.857115519 +0100 --- src/vim9expr.c 2022-05-22 21:51:

Re: Patch 8.2.5003

2022-05-22 Fir de Conversatie Bram Moolenaar
John Marriott wrote: > On 23-May-2022 04:14, Bram Moolenaar wrote: > > Patch 8.2.5003 > > Problem:Cannot do bitwise shifts. > > Solution: Add the >> and << operators. (Yegappan Lakshmanan, closes #84= > 57) > > Files: runtime/doc/eval.txt, src/errors.h, src/eval.c, src/structs.h= > ,

Re: Patch 8.2.5003

2022-05-22 Fir de Conversatie Tony Mechelynck
On Sun, May 22, 2022 at 9:09 PM John Marriott wrote: > > > > On 23-May-2022 04:14, Bram Moolenaar wrote: > > Patch 8.2.5003 > > Problem:Cannot do bitwise shifts. > > Solution: Add the >> and << operators. (Yegappan Lakshmanan, closes #8457) > > Files: runtime/doc/eval.txt, src/errors.h,

Re: Patch 8.2.5003

2022-05-22 Fir de Conversatie John Marriott
On 23-May-2022 05:08, John Marriott wrote: On 23-May-2022 04:14, Bram Moolenaar wrote: Patch 8.2.5003 Problem:    Cannot do bitwise shifts. Solution:   Add the >> and << operators. (Yegappan Lakshmanan, closes #8457) Files:  runtime/doc/eval.txt, src/errors.h, src/eval.c, src/structs.

Patch 8.2.5004

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.5004 Problem:Right shift on negative number does not work as documented. Solution: Use a uvarnumber_T type cast. Files: runtime/doc/eval.txt, src/eval.c, src/vim9expr.c, src/vim9execute.c, src/charset.c, src/testdir/test_expr.vim *** ../vim-8.2.5003/runtime/doc/

Re: Patch 8.2.5003

2022-05-22 Fir de Conversatie John Marriott
On 23-May-2022 04:14, Bram Moolenaar wrote: Patch 8.2.5003 Problem:Cannot do bitwise shifts. Solution: Add the >> and << operators. (Yegappan Lakshmanan, closes #8457) Files: runtime/doc/eval.txt, src/errors.h, src/eval.c, src/structs.h, src/vim.h, src/vim9execute.c, sr

Re: [vim/vim] Add support for bitwise left/right shift operators (#8457)

2022-05-22 Fir de Conversatie Bram Moolenaar
I wrote: > > @errael commented on this pull request. > > > > > > > + if (iptr->isn_arg.op.op_type == EXPR_RSHIFT) > > + // clear the topmost sign bit > > + res &= ~((uvarnumber_T)1 << MAX_LSHIFT_BITS); > > > > Have you tried it without this post

Re: [vim/vim] Add support for bitwise left/right shift operators (#8457)

2022-05-22 Fir de Conversatie Bram Moolenaar
> @errael commented on this pull request. > > > > + if (iptr->isn_arg.op.op_type == EXPR_RSHIFT) > + // clear the topmost sign bit > + res &= ~((uvarnumber_T)1 << MAX_LSHIFT_BITS); > > Have you tried it without this post shift fixup? Since

Patch 8.2.5003

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.5003 Problem:Cannot do bitwise shifts. Solution: Add the >> and << operators. (Yegappan Lakshmanan, closes #8457) Files: runtime/doc/eval.txt, src/errors.h, src/eval.c, src/structs.h, src/vim.h, src/vim9execute.c, src/vim9expr.c, src/testdir/test_expr.

Re: [vim/vim] Add support for bitwise left/right shift operators (#8457)

2022-05-22 Fir de Conversatie Ernie Rael
On 5/22/22 11:00 AM, Yegappan Lakshmanan wrote: The left operand of a bitshift operator can be a negative number. Consider this case: -1 >> 0 The result should be -1. AFAICT. The code treats the number as unsigned and does a logical right shift, so no fixup needed. -- -- You received thi

Re: [vim/vim] Add support for bitwise left/right shift operators (#8457)

2022-05-22 Fir de Conversatie Yegappan Lakshmanan
Hi, On Sun, May 22, 2022 at 10:41 AM errael wrote: > *@errael* commented on this pull request. > -- > > In src/vim9execute.c > : > > > + if (iptr->isn_arg.op.op_type == EXPR_RSHIFT) > +

Patch 8.2.5002

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.5002 Problem:deletebufline() may change Visual selection. Solution: Disable Visual mode when using another buffer. (closes #10469) Files: src/evalbuffer.c, src/testdir/test_bufline.vim *** ../vim-8.2.5001/src/evalbuffer.c2022-05-22 11:59:20.527602615 +0100 --- src/evalb

Patch 8.2.5001

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.5001 Problem:Checking translations affects the search pattern history. Solution: Use "keeppatterns". (Doug Kearns) Files: src/po/check.vim *** ../vim-8.2.5000/src/po/check.vim2020-08-30 18:42:02.949565997 +0100 --- src/po/check.vim2022-05-22 15:26:08.998368408 +0100

Patch 8.2.4999

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.4999 Problem:Filetype test table is not properly sorted. Solution: Sort by filetype. (Doug Kearns) Files: src/testdir/test_filetype.vim *** ../vim-8.2.4998/src/testdir/test_filetype.vim 2022-05-02 23:50:24.389602160 +0100 --- src/testdir/test_filetype.vim 2022-

Patch 8.2.4998

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.4998 Problem:Vim9: crash when using multiple funcref(). Solution: Check if varargs type is NULL. (closes #10467) Files: src/vim9type.c, src/testdir/test_vim9_func.vim *** ../vim-8.2.4997/src/vim9type.c 2022-03-31 20:02:52.422045605 +0100 --- src/vim9type.c 2022-05

Patch 8.2.4997

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.4997 Problem:Python: changing hidden buffer can cause the display to be messed up. Solution: Do not mark changed lines when using another buffer. (Paul Ollis, closes #10437, closes #7972) Files: src/if_py_both.h, src/testdir/test_python3.vim *** ../v

Re: [vim/vim] Add support for bitwise left/right shift operators (#8457)

2022-05-22 Fir de Conversatie Yegappan Lakshmanan
Hi, Responding to Dominique Pelle's comments (which somehow are not added to the PR): > > What happens if you do: > > 42 >> -1 (in C, shifting by negative number is undefined behavior, in > Vim it should be an error or maybe 0?) > In this case, Vim will display the "E1283: bitshift amount must b

Patch 8.2.4996

2022-05-22 Fir de Conversatie Bram Moolenaar
Patch 8.2.4996 (after 8.2.4969) Problem:setbufline() may change Visual selection. (Qiming Zhao) Solution: Disable Visual mode when using another buffer. (closes #10466) Files: src/evalbuffer.c, src/testdir/test_bufline.vim *** ../vim-8.2.4995/src/evalbuffer.c2022-01-08 12:41:12.2

Re: [vim/vim] formatoptions+=r continues a // comment that isn't at the start of the line (Issue #10006)

2022-05-22 Fir de Conversatie Gary Johnson
On 2022-05-21, Terry Greeniaus wrote: > Seriously, practically nobody ever wants this behaviour. It's just > not how anybody ever comments code. Changing the default behaviour > in favor of the 3 people that do this vs. the 15 million people > that don't is... questionable. Really? Both the Linux

Re: [vim/vim] [WIP] feature: add has('wsl') (PR #10464)

2022-05-22 Fir de Conversatie Gary Johnson
On 2022-05-21, Kato wrote: > @ Gary (sorry, I don't know how to reply well to vim-ml) No problem. I don't know how to reply properly to both the list and the forum from the list, either, so I reply to both and live with the duplicate messages in the list. > Thanks for pointing that out. > WSL u