aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-04-09 08:50:34 +0100
committerRon Yorston <rmy@pobox.com>2018-04-09 08:50:34 +0100
commit921c1ab66bad54d4ad8591bb74e41ac985248496 (patch)
tree552a04c691e78e78570e4ec2c83fbc0e59953924 /libbb/lineedit.c
parent5b6f06f5eb8628955262508d153627fe6f2d1c8b (diff)
parenta1870f4807a75663a085c9f5e92870fa7554f0ad (diff)
downloadbusybox-w32-921c1ab66bad54d4ad8591bb74e41ac985248496.tar.gz
busybox-w32-921c1ab66bad54d4ad8591bb74e41ac985248496.tar.bz2
busybox-w32-921c1ab66bad54d4ad8591bb74e41ac985248496.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 36b6abe2b..431f1c048 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -466,7 +466,8 @@ static void put_till_end_and_adv_cursor(void)
466static void goto_new_line(void) 466static void goto_new_line(void)
467{ 467{
468 put_till_end_and_adv_cursor(); 468 put_till_end_and_adv_cursor();
469 if (cmdedit_x != 0) 469 /* "cursor == 0" is only if prompt is "" and user input is empty */
470 if (cursor == 0 || cmdedit_x != 0)
470 bb_putchar('\n'); 471 bb_putchar('\n');
471} 472}
472 473