mirror of
https://github.com/nushell/reedline.git
synced 2024-09-11 15:55:50 +03:00
Print after cursor until newline (#700)
This commit is contained in:
parent
7404f70bf7
commit
3e2c0fef3b
@ -389,6 +389,12 @@ impl Painter {
|
||||
if let Some(menu) = menu {
|
||||
// TODO: Also solve the difficult problem of displaying (parts of)
|
||||
// the content after the cursor with the completion menu
|
||||
// This only shows the rest of the line the cursor is on
|
||||
if let Some(newline) = lines.after_cursor.find('\n') {
|
||||
self.stdout.queue(Print(&lines.after_cursor[0..newline]))?;
|
||||
} else {
|
||||
self.stdout.queue(Print(&lines.after_cursor))?;
|
||||
}
|
||||
self.print_menu(menu, lines, use_ansi_coloring)?;
|
||||
} else {
|
||||
// Selecting lines for the hint
|
||||
|
Loading…
Reference in New Issue
Block a user