New lines are lost to history

I think the history mode omits certain key aspects, and I think it would be better if it worked slightly differently.

  1. Type something Welcome
  2. Insert new line twice (so the text is Welcome\n\n)
  3. Paste something, and immediately press Ctrl+Z

I would expect to see Welcome\n\n still, but sometimes it removes them, and sometimes it removes the word Welcome as well.

Going to assume you’re talking about CodeMirror 6, from your other posts. I’m really not sure what to do with the observation that the history “omits certain key aspects”, but I do guess it’s reasonable not to join pastes with other events. See this patch.

Going to assume you’re talking about CodeMirror 6, from your other posts

Yea.

I’m really not sure what to do with the observation that the history “omits certain key aspects”, but I do guess it’s reasonable not to join pastes with other events. See this patch.

I run your changes in my local node_modules/ and it seams to be fixing the problem! :slight_smile: Can you relase it as the next tag?

Tagged as 0.19.1

1 Like

Thank you very much!