Patch 8.2.5108
Problem: Retab test disabled because it hangs on MS-Windows.
Solution: Also set got_int at the other place a overlong text is detected.
Files: src/indent.c, src/testdir/test_retab.vim
*** ../vim-8.2.5107/src/indent.c 2022-06-15 21:08:05.257105150 +0100
--- src/indent.c 2022-06-16 12:09:22.947539917 +0100
***************
*** 1613,1618 ****
--- 1613,1632 ----
}
/*
+ * Give a "resulting text too long" error and maybe set got_int.
+ */
+ static void
+ emsg_text_too_long(void)
+ {
+ emsg(_(e_resulting_text_too_long));
+ #ifdef FEAT_EVAL
+ // when not inside a try/catch set got_int to break out of any loop
+ if (trylevel == 0)
+ #endif
+ got_int = TRUE;
+ }
+
+ /*
* ":retab".
*/
void
***************
*** 1749,1755 ****
new_len = old_len - col + start_col + len + 1;
if (new_len <= 0 || new_len >= MAXCOL)
{
! emsg(_(e_resulting_text_too_long));
break;
}
new_line = alloc(new_len);
--- 1763,1769 ----
new_len = old_len - col + start_col + len + 1;
if (new_len <= 0 || new_len >= MAXCOL)
{
! emsg_text_too_long();
break;
}
new_line = alloc(new_len);
***************
*** 1780,1792 ****
vcol += chartabsize(ptr + col, (colnr_T)vcol);
if (vcol >= MAXCOL)
{
! emsg(_(e_resulting_text_too_long));
! // when not inside a try/catch set got_int to break out of any
! // loop
! #ifdef FEAT_EVAL
! if (trylevel == 0)
! #endif
! got_int = TRUE;
break;
}
if (has_mbyte)
--- 1794,1800 ----
vcol += chartabsize(ptr + col, (colnr_T)vcol);
if (vcol >= MAXCOL)
{
! emsg_text_too_long();
break;
}
if (has_mbyte)
*** ../vim-8.2.5107/src/testdir/test_retab.vim 2022-06-15 22:11:41.371540580
+0100
--- src/testdir/test_retab.vim 2022-06-16 12:09:51.959483752 +0100
***************
*** 92,98 ****
endfunc
func Test_retab_endless()
! " inside try/catch we catch the error message
call setline(1, "\t0\t")
let caught = 'no'
try
--- 92,98 ----
endfunc
func Test_retab_endless()
! " inside try/catch we can catch the error message
call setline(1, "\t0\t")
let caught = 'no'
try
***************
*** 106,118 ****
endfunc
func Test_nocatch_retab_endless()
! " FIXME: why does this hang on MS-Windows? Is got_int reset somewhere?
! if has('win32')
! let g:skipped_reason = "does not work on MS-Windows"
! return
! endif
!
! " not inside try/catch an interrupt is generated to get out of loops
call setline(1, "\t0\t")
call assert_fails('call RetabLoop()', ['E1240:', 'Interrupted'])
--- 106,112 ----
endfunc
func Test_nocatch_retab_endless()
! " when not inside try/catch an interrupt is generated to get out of loops
call setline(1, "\t0\t")
call assert_fails('call RetabLoop()', ['E1240:', 'Interrupted'])
*** ../vim-8.2.5107/src/version.c 2022-06-16 11:42:05.600034913 +0100
--- src/version.c 2022-06-16 12:06:14.115921643 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5108,
/**/
--
(letter from Mark to Mike, about the film's probable certificate)
I would like to get back to the Censor and agree to lose the shits, take
the odd Jesus Christ out and lose Oh fuck off, but to retain 'fart in
your general direction', 'castanets of your testicles' and 'oral sex'
and ask him for an 'A' rating on that basis.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220616111115.9F9A41C233D%40moolenaar.net.