https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293267

            Bug ID: 293267
           Summary: bin/sh: Visual glitch on ^C on multiline input buffer
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: [email protected]
          Reporter: [email protected]

Consider a situation when you have entered a very long command line in the
interactive mode so it has been split into two or more lines due to terminal
width (let's use '%' sign for current cursor position):

user@host$ my_command_1 && my_command_2 && my_command_3 # <-- We hit the
terminal width
&& my_command_4 && my_command_5%

Now, if we would navigate the cursor to the begining of the command (which is
on the first line):

user@host$ my_com%mand_1 && my_command_2 && my_command_3 # <-- We hit the
terminal width
&& my_command_4 && my_command_5

... and hit ^C at this place:

user@host$ my_command_1 && my_command_2 && my_command_3 # <-- We hit the
terminal width
user@host$ %nd_4 && my_command_5

As we can see, the tail of the long command 'nd_4 && my_command_5' is still
printed on the screen, which is confusing and inconvenient.

The expected behaviour would be (after hitting ^C at that point):

user@host$ my_command_1 && my_command_2 && my_command_3 # <-- We hit the
terminal width
&& my_command_4 && my_command_5
user@host$ %

... i.e, the new prompt should be printed after the last line (last of the two
in our case) of the previously entered command.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to