mirror of
https://github.com/nushell/reedline.git
synced 2024-07-14 19:00:30 +03:00
respect windows newline in update_values
This commit is contained in:
parent
1f612dc313
commit
070d600545
@ -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(),
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user