respect windows newline in update_values

This commit is contained in:
maxomatic458 2024-01-20 19:11:17 +01:00
parent 1f612dc313
commit 070d600545
2 changed files with 2 additions and 2 deletions

View File

@ -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(),

View File

@ -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(),