Skip to content

Commit

Permalink
Print after cursor until newline (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysthakur authored Jan 11, 2024
1 parent 7404f70 commit 3e2c0fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/painting/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e2c0fe

Please sign in to comment.