Skip to content

Commit

Permalink
respect windows newline in update_values
Browse files Browse the repository at this point in the history
  • Loading branch information
maxomatic458 committed Jan 20, 2024
1 parent 1f612dc commit 070d600
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/menu/columnar_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ impl Menu for ColumnarMenu {
// editing a multiline buffer.
// Also, by replacing the new line character with a space, the insert
// position is maintain in the line buffer.
let trimmed_buffer = editor.get_buffer().replace('\n', " ");
let trimmed_buffer = editor.get_buffer().replace("\r\n", " ").replace('\n', " ");
completer.complete(
&trimmed_buffer[..editor.insertion_point()],
editor.insertion_point(),
Expand Down
2 changes: 1 addition & 1 deletion src/menu/ide_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ impl Menu for IdeMenu {
// editing a multiline buffer.
// Also, by replacing the new line character with a space, the insert
// position is maintain in the line buffer.
let trimmed_buffer = editor.get_buffer().replace('\n', " ");
let trimmed_buffer = editor.get_buffer().replace("\r\n", " ").replace('\n', " ");
completer.complete(
&trimmed_buffer[..editor.insertion_point()],
editor.insertion_point(),
Expand Down

0 comments on commit 070d600

Please sign in to comment.