File: readline82-007.diff

package info (click to toggle)
readline 8.3-3
  • links: PTS
  • area: main
  • in suites: forky
  • size: 9,764 kB
  • sloc: ansic: 30,409; sh: 6,600; perl: 4,105; makefile: 1,856
file content (37 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
			   READLINE PATCH REPORT
			   =====================

Readline-Release: 8.2
Patch-ID: readline82-007

Bug-Reported-by:	Kevin Pulo <kev@pulo.com.au>
Bug-Reference-ID:
Bug-Reference-URL:	https://lists.gnu.org/archive/html/bug-readline/2022-11/msg00002.html

Bug-Description:

If readline is called with no prompt, it should display a newline if return
is typed on an empty line. It should still suppress the final newline if
return is typed on the last (empty) line of a multi-line command.

--- a/display.c
+++ b/display.c
@@ -3338,9 +3338,9 @@ _rl_update_final (void)
       puts_face (&last_line[_rl_screenwidth - 1 + woff],
 		 &last_face[_rl_screenwidth - 1 + woff], 1);
     }
-  _rl_vis_botlin = 0;
-  if (botline_length > 0 || _rl_last_c_pos > 0)
+  if ((_rl_vis_botlin == 0 && botline_length == 0) || botline_length > 0 || _rl_last_c_pos > 0)
     rl_crlf ();
+  _rl_vis_botlin = 0;
   fflush (rl_outstream);
   rl_display_fixed++;
 }
--- a/patchlevel
+++ b/patchlevel
@@ -1,3 +1,3 @@
 # Do not edit -- exists only for use by patch
 
-6
+7