mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Fixed pasting in single line editor (#140)
This commit is contained in:
parent
f145b968be
commit
584423abae
@ -459,9 +459,7 @@ class CodeEditor extends PureComponent {
|
||||
const text = change.text
|
||||
.join('') // join all changed lines into one
|
||||
.replace(/\n/g, ' '); // Convert all whitespace to spaces
|
||||
const from = {ch: change.from.ch, line: 0};
|
||||
const to = {ch: from.ch + text.length, line: 0};
|
||||
change.update(from, to, [text]);
|
||||
change.update(change.from, change.to, [text]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user