diff src/misc1.c @ 24673:53fd6370e4fd v8.2.2875

patch 8.2.2875: cancelling inputlist() after a digit does not return zero Commit: https://github.com/vim/vim/commit/5cf94577cf2045fec87344d7d89422fe6dfce62f Author: =?UTF-8?q?Luka=20Marku=C5=A1i=C4=87?= <luka.markusic@microblink.com> Date: Thu May 20 21:14:20 2021 +0200 patch 8.2.2875: cancelling inputlist() after a digit does not return zero Problem: Cancelling inputlist() after a digit does not return zero. Solution: Always return zero when cancelling. (closes https://github.com/vim/vim/issues/8231)
author Bram Moolenaar <Bram@vim.org>
date Thu, 20 May 2021 21:15:04 +0200
parents 44be09b25619
children dc66d0284518
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -946,7 +946,12 @@ get_number(
 	    do_redraw = FALSE;
 	    break;
 	}
-	else if (c == CAR || c == NL || c == Ctrl_C || c == ESC || c == 'q')
+	else if (c == Ctrl_C || c == ESC || c == 'q')
+	{
+	    n = 0;
+	    break;
+	}
+	else if (c == CAR || c == NL )
 	    break;
     }
     --no_mapping;