Re: [patch] doc fixes

2022-03-01 Fir de Conversatie Bram Moolenaar


Dominique wrote:

> Attached patch fixes typos in docs in vim-8.2.4487.
> 
> It fixes different typos than those already reported
> in version9.txt at https://github.com/vim/vim/pull/9855

I'll include it, thanks.

-- 
hundred-and-one symptoms of being an internet addict:
135. You cut classes or miss work so you can stay home and browse the web.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220301212045.8956A1C44B4%40moolenaar.net.


Patch 8.2.4488

2022-03-01 Fir de Conversatie Bram Moolenaar


Patch 8.2.4488 (after 8.2.4487)
Problem:Build error with +eval but without +channel or +job.
Solution:   Add #ifdef. (John Marriott)
Files:  src/typval.c


*** ../vim-8.2.4487/src/typval.c2022-03-01 19:23:20.544357315 +
--- src/typval.c2022-03-01 19:48:57.457236819 +
***
*** 1394,1403 
--- 1394,1407 
switch (tv->v_type)
{
case VAR_BLOB: return tv->vval.v_blob == NULL;
+ #ifdef FEAT_JOB_CHANNEL
case VAR_CHANNEL: return tv->vval.v_channel == NULL;
+ #endif
case VAR_DICT: return tv->vval.v_dict == NULL;
case VAR_FUNC: return tv->vval.v_string == NULL;
+ #ifdef FEAT_JOB_CHANNEL
case VAR_JOB: return tv->vval.v_job == NULL;
+ #endif
case VAR_LIST: return tv->vval.v_list == NULL;
case VAR_PARTIAL: return tv->vval.v_partial == NULL;
case VAR_STRING: return tv->vval.v_string == NULL;
*** ../vim-8.2.4487/src/version.c   2022-03-01 19:23:20.544357315 +
--- src/version.c   2022-03-01 19:50:35.341043179 +
***
*** 756,757 
--- 756,759 
  {   /* Add new patch number below this line */
+ /**/
+ 4488,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
134. You consider bandwidth to be more important than carats.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220301195323.4475F1C44AD%40moolenaar.net.


[patch] doc fixes

2022-03-01 Fir de Conversatie Dominique Pellé
Hi

Attached patch fixes typos in docs in vim-8.2.4487.

It fixes different typos than those already reported
in version9.txt at https://github.com/vim/vim/pull/9855

Regards
Dominique

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAON-T_gqS%3DXLeqC0xUN%3DKTRPe%2BgHhO34shc_Yd1WsqDoZ6aeYg%40mail.gmail.com.
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 71ea17338..0256f4b01 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -14965,7 +14965,7 @@ Solution:   Adjust autoconf. (lilydjwg)
 Files:	src/configure.in, src/auto/configure
 
 Patch 7.3.806
-Problem:Compiler warnings in Perl code when building with Visual studio
+Problem:Compiler warnings in Perl code when building with Visual Studio
 	2012. (skeept)
 Solution:   Add type casts. (Christian Brabandt, 2013 Jan 30)
 Files:	src/if_perl.xs
diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
index 4a62f..b7185e866 100644
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -7916,7 +7916,7 @@ Solution:   Put remainder of message back in the queue.
 Files:  src/channel.c
 
 Patch 7.4.1240
-Problem:Visual studio tools are noisy.
+Problem:Visual Studio tools are noisy.
 Solution:   Suppress startup info. (Mike Williams)
 Files:  src/GvimExt/Makefile, src/Make_mvc.mak, src/tee/Make_mvc.mak
 
@@ -20476,7 +20476,7 @@ Files:  src/normal.c, src/misc2.c, src/Makefile,
 src/testdir/test_virtualedit.vim, src/testdir/test_alot.vim
 
 Patch 8.0.0963
-Problem:Terminal test fails on MacOS. (chdiza)
+Problem:Terminal test fails on macOS. (chdiza)
 Solution:   Wait for the shell to echo the characters. (closes #1991)
 Files:  src/testdir/test_terminal.vim
 
@@ -31038,7 +31038,7 @@ Files:	src/ui.c, src/testdir/test_timers.vim, src/gui_gtk_x11.c,
 src/gui_w32.c, src/gui_photon.c, src/gui_x11.c
 
 Patch 8.1.0841
-Problem:Travis config to get Lua on MacOS is too complicated.
+Problem:Travis config to get Lua on macOS is too complicated.
 Solution:   Use an addons entry. (Ozaki Kiichi, closes #3876)
 Files:	.travis.yml
 
@@ -39471,7 +39471,7 @@ Solution:   Add to the list of flaky tests.
 Files:	src/testdir/runtest.vim
 
 Patch 8.1.2152
-Problem:Problems navigating tags file on MacOS Catalina.
+Problem:Problems navigating tags file on macOS Catalina.
 Solution:   Use fseek instead of lseek. (John Lamb, fixes #5061)
 Files:	src/tag.c
 
@@ -40648,7 +40648,7 @@ Solution:   Allow key codes when fetching argument for CTRL-R. (closes #5266)
 Files:	src/edit.c, src/ex_getln.c, src/testdir/test_termcodes.vim
 
 Patch 8.1.2347 (after 8.1.2344)
-Problem:MacOS: build fails.
+Problem:macOS: build fails.
 Solution:   Don't define _XOPEN_SOURCE for Mac.
 Files:	src/vim.h
 
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index ca0bbbca7..8ea52490f 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -227,7 +227,7 @@ Solution:   Add tests. (Dominique Pellé, closes #5366)
 Files:  src/testdir/test_termcodes.vim
 
 Patch 8.2.0021
-Problem:Timer test fails too often on Travis with MacOS.
+Problem:Timer test fails too often on Travis with macOS.
 Solution:   Be less strict with the time.
 Files:  src/testdir/test_timers.vim
 
@@ -12504,7 +12504,7 @@ Files:  src/testdir/test_search.vim
 
 Patch 8.2.2051
 Problem:Vim9: crash when aborting a user function call.
-Solution:   Do not use the return value when aboring. (closes #7372)
+Solution:   Do not use the return value when aborting. (closes #7372)
 Files:  src/vim9execute.c, src/testdir/test_vim9_func.vim
 
 Patch 8.2.2052
@@ -12852,7 +12852,7 @@ Files:  src/gui_gtk_x11.c
 Patch 8.2.2112
 Problem:Running tests may leave some files behind.
 Solution:   Delete the right files.  Fix a few typos. (Dominique Pellé,
-closes #7436
+closes #7436)
 Files:  src/testdir/test_filetype.vim, src/testdir/test_messages.vim,
 src/testdir/test_mksession.vim
 
@@ -12950,7 +12950,7 @@ Files:  src/os_mswin.c
 
 Patch 8.2.2130
 Problem:Insert mode completion messages end up in message history.
-Solution:   Set msg_hist_off. (closes #7452
+Solution:   Set msg_hist_off. (closes #7452)
 Files:  src/insexpand.c, src/testdir/test_ins_complete.vim
 
 Patch 8.2.2131
@@ -13138,7 +13138,7 @@ Files:  src/bufwrite.c, src/cindent.c, src/cmdexpand.c, src/eval.c,
 
 Patch 8.2.2161
 Problem:Arguments -T and -x not tested 

Re: Patch 8.2.4487

2022-03-01 Fir de Conversatie John Marriott


On 02-Mar-2022 06:23, Bram Moolenaar wrote:

Patch 8.2.4487
Problem:Vim9: cannot compare with v:null.
Solution:   Allow comparing anything with v:null. (closes #9866)
Files:  src/vim9instr.c, src/typval.c, src/proto/typval.pro,
 src/vim9.h, src/vim9execute.c, src/evalvars.c,
 src/testdir/test_vim9_expr.vim,
 src/testdir/test_vim9_disassemble.vim


After this patch mingw64 (gcc 11.2.0) spits out this error if 
FEAT_JOB_CHANNEL is not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD typval.c -o 
gobjnative/typval.o

typval.c: In function 'typval_compare_null':
typval.c:1397:46: error: 'union ' has no member named 'v_channel'
 1397 | case VAR_CHANNEL: return tv->vval.v_channel == NULL;
  |  ^
typval.c:1400:43: error: 'union ' has no member named 
'v_job'; did you mean 'v_blob'?

 1400 | case VAR_JOB: return tv->vval.v_job == NULL;
  |   ^
  |   v_blob
make: *** [Make_cyg_ming.mak:1183: gobjnative/typval.o] Error 1


The attached patch tries to fix it.

Cheers
John

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/43c1a7a4-b200-ed83-de67-bc31cdbffdb0%40internode.on.net.
--- typval.c.orig   2022-03-02 06:31:51.382661100 +1100
+++ typval.c2022-03-02 06:39:18.365574500 +1100
@@ -1394,10 +1394,14 @@
switch (tv->v_type)
{
case VAR_BLOB: return tv->vval.v_blob == NULL;
+#ifdef FEAT_JOB_CHANNEL
case VAR_CHANNEL: return tv->vval.v_channel == NULL;
+#endif
case VAR_DICT: return tv->vval.v_dict == NULL;
case VAR_FUNC: return tv->vval.v_string == NULL;
+#ifdef FEAT_JOB_CHANNEL
case VAR_JOB: return tv->vval.v_job == NULL;
+#endif
case VAR_LIST: return tv->vval.v_list == NULL;
case VAR_PARTIAL: return tv->vval.v_partial == NULL;
case VAR_STRING: return tv->vval.v_string == NULL;


Patch 8.2.4487

2022-03-01 Fir de Conversatie Bram Moolenaar


Patch 8.2.4487
Problem:Vim9: cannot compare with v:null.
Solution:   Allow comparing anything with v:null. (closes #9866)
Files:  src/vim9instr.c, src/typval.c, src/proto/typval.pro,
src/vim9.h, src/vim9execute.c, src/evalvars.c,
src/testdir/test_vim9_expr.vim,
src/testdir/test_vim9_disassemble.vim


*** ../vim-8.2.4486/src/vim9instr.c 2022-02-06 17:16:57.730598839 +
--- src/vim9instr.c 2022-03-01 17:51:00.890904474 +
***
*** 372,377 
--- 372,395 
|| ((type1 == VAR_NUMBER || type1 == VAR_FLOAT)
  && (type2 == VAR_NUMBER || type2 == VAR_FLOAT)))
isntype = ISN_COMPAREANY;
+ else if (type1 == VAR_SPECIAL || type2 == VAR_SPECIAL)
+ {
+   switch (type1 == VAR_SPECIAL ? type2 : type1)
+   {
+   case VAR_BLOB: break;
+   case VAR_CHANNEL: break;
+   case VAR_DICT: break;
+   case VAR_FUNC: break;
+   case VAR_JOB: break;
+   case VAR_LIST: break;
+   case VAR_PARTIAL: break;
+   case VAR_STRING: break;
+   default: semsg(_(e_cannot_compare_str_with_str),
+  vartype_name(type1), vartype_name(type2));
+return ISN_DROP;
+   }
+   isntype = ISN_COMPARENULL;
+ }
  
  if ((exprtype == EXPR_IS || exprtype == EXPR_ISNOT)
&& (isntype == ISN_COMPAREBOOL
***
*** 388,394 
&& (type1 == VAR_BOOL || type1 == VAR_SPECIAL
   || type2 == VAR_BOOL || type2 == VAR_SPECIAL)))
|| ((exprtype != EXPR_EQUAL && exprtype != EXPR_NEQUAL
!&& exprtype != EXPR_IS && exprtype != 
EXPR_ISNOT
&& (type1 == VAR_BLOB || type2 == VAR_BLOB
|| type1 == VAR_LIST || type2 == VAR_LIST
  {
--- 406,412 
&& (type1 == VAR_BOOL || type1 == VAR_SPECIAL
   || type2 == VAR_BOOL || type2 == VAR_SPECIAL)))
|| ((exprtype != EXPR_EQUAL && exprtype != EXPR_NEQUAL
!  && exprtype != EXPR_IS && exprtype != EXPR_ISNOT
&& (type1 == VAR_BLOB || type2 == VAR_BLOB
|| type1 == VAR_LIST || type2 == VAR_LIST
  {
***
*** 2131,2136 
--- 2149,2155 
case ISN_COMPAREFUNC:
case ISN_COMPARELIST:
case ISN_COMPARENR:
+   case ISN_COMPARENULL:
case ISN_COMPARESPECIAL:
case ISN_COMPARESTRING:
case ISN_CONCAT:
*** ../vim-8.2.4486/src/typval.c2022-01-08 21:38:48.203970853 +
--- src/typval.c2022-03-01 19:16:46.253253162 +
***
*** 1169,1174 
--- 1169,1189 
// it means TRUE.
n1 = (type == EXPR_ISNOT);
  }
+ else if (((tv1->v_type == VAR_SPECIAL && tv1->vval.v_number == VVAL_NULL)
+   || (tv2->v_type == VAR_SPECIAL
+  && tv2->vval.v_number == VVAL_NULL))
+   && tv1->v_type != tv2->v_type
+   && (type == EXPR_EQUAL || type == EXPR_NEQUAL))
+ {
+   n1 = typval_compare_null(tv1, tv2);
+   if (n1 == MAYBE)
+   {
+   clear_tv(tv1);
+   return FAIL;
+   }
+   if (type == EXPR_NEQUAL)
+   n1 = !n1;
+ }
  else if (tv1->v_type == VAR_BLOB || tv2->v_type == VAR_BLOB)
  {
if (typval_compare_blob(tv1, tv2, type, ) == FAIL)
***
*** 1366,1371 
--- 1381,1415 
  }
  
  /*
+  * Compare v:null/v:none with another type.  Return TRUE if the value is NULL.
+  */
+ int
+ typval_compare_null(typval_T *tv1, typval_T *tv2)
+ {
+ if ((tv1->v_type == VAR_SPECIAL && tv1->vval.v_number == VVAL_NULL)
+   || (tv2->v_type == VAR_SPECIAL && tv2->vval.v_number == VVAL_NULL))
+ {
+   typval_T*tv = tv1->v_type == VAR_SPECIAL ? tv2 : tv1;
+ 
+   switch (tv->v_type)
+   {
+   case VAR_BLOB: return tv->vval.v_blob == NULL;
+   case VAR_CHANNEL: return tv->vval.v_channel == NULL;
+   case VAR_DICT: return tv->vval.v_dict == NULL;
+   case VAR_FUNC: return tv->vval.v_string == NULL;
+   case VAR_JOB: return tv->vval.v_job == NULL;
+   case VAR_LIST: return tv->vval.v_list == NULL;
+   case VAR_PARTIAL: return tv->vval.v_partial == NULL;
+   case VAR_STRING: return tv->vval.v_string == NULL;
+   default: break;
+   }
+ }
+ semsg(_(e_cannot_compare_str_with_str),
+vartype_name(tv1->v_type), vartype_name(tv2->v_type));
+ return MAYBE;
+ }
+ 
+ /*
   * Compare "tv1" to "tv2" as blobs acording to "type".
   * Put the result, false or true, in "res".
   * Return FAIL and give an error message when the comparison can't be done.
*** ../vim-8.2.4486/src/proto/typval.pro2021-12-25 19:29:18.409881900 
+
--- src/proto/typval.pro

Patch 8.2.4486

2022-03-01 Fir de Conversatie Bram Moolenaar


Patch 8.2.4486
Problem:MS-Windows GUI: slow scrolling with maximized window.
Solution:   Use a better way to check the window is on screen. (Ken Takata,
closes #9865)
Files:  src/gui_w32.c


*** ../vim-8.2.4485/src/gui_w32.c   2022-02-24 11:39:35.960798129 +
--- src/gui_w32.c   2022-03-01 15:56:37.435430518 +
***
*** 3016,3022 
  }
  
  /*
!  * Check if the whole area of the specified window is on-screen.
   *
   * Note about DirectX: Windows 10 1809 or above no longer maintains image of
   * the window portion that is off-screen.  Scrolling by DWriteContext_Scroll()
--- 3016,3022 
  }
  
  /*
!  * Check if the whole client area of the specified window is on-screen.
   *
   * Note about DirectX: Windows 10 1809 or above no longer maintains image of
   * the window portion that is off-screen.  Scrolling by DWriteContext_Scroll()
***
*** 3026,3041 
  is_window_onscreen(HWND hwnd)
  {
  RECTrc;
  
! GetWindowRect(hwnd, );
  
! if (!is_point_onscreen(rc.left, rc.top))
return FALSE;
! if (!is_point_onscreen(rc.left, rc.bottom))
return FALSE;
! if (!is_point_onscreen(rc.right, rc.top))
return FALSE;
! if (!is_point_onscreen(rc.right, rc.bottom))
return FALSE;
  return TRUE;
  }
--- 3026,3048 
  is_window_onscreen(HWND hwnd)
  {
  RECTrc;
+ POINT   p1, p2;
  
! GetClientRect(hwnd, );
! p1.x = rc.left;
! p1.y = rc.top;
! p2.x = rc.right - 1;
! p2.y = rc.bottom - 1;
! ClientToScreen(hwnd, );
! ClientToScreen(hwnd, );
  
! if (!is_point_onscreen(p1.x, p1.y))
return FALSE;
! if (!is_point_onscreen(p1.x, p2.y))
return FALSE;
! if (!is_point_onscreen(p2.x, p1.y))
return FALSE;
! if (!is_point_onscreen(p2.x, p2.y))
return FALSE;
  return TRUE;
  }
*** ../vim-8.2.4485/src/version.c   2022-02-28 21:02:16.271053073 +
--- src/version.c   2022-03-01 15:57:57.107424431 +
***
*** 756,757 
--- 756,759 
  {   /* Add new patch number below this line */
+ /**/
+ 4486,
  /**/

-- 
Never eat yellow snow.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220301160351.BC8691C44AD%40moolenaar.net.