When beginning to edit a text field with firenvim in Firefox, single blank lines in the browser's native text box becomes two blank lines in firenvim in some situations. For example, opening this:
becomes this in firenvim:
And, predictably, if I write the results of that editing session without first deleting the extra two lines, I end up with extra newlines back in the firefox text box:
Additional observations
Note that it is only empty lines which are doubled - two adjacent non-empty lines do not have an extra newline inserted between them (honestly, this confuses me more than if every newline were doubled!).
Also, this isn't universally the case - some text boxes work fine, but other times I see the blank line-doubling behavior. You can visit https://jupyter.org/try-jupyter/notebooks/?path=notebooks/Intro.ipynb to test a problematic case - edit the text field with the first line of "from matplotlib import pyplot as plt" in Firefox.
I am able to use firenvim in Chromium and do not observe the same behavior as I do in Firefox. I also noticed while testing this that in Firefox, firenvim has the filetype set to text, while chromium has it set to python... I don't know if that's a clue or just some other difference.
What I tried to do
Edit a text field at https://jupyter.org/try-jupyter/notebooks/?path=notebooks/Intro.ipynb with firenvim in Firefox, and have blank lines be preserved across entering/exiting the editing session.
What happened
When beginning to edit a text field with firenvim in Firefox, single blank lines in the browser's native text box becomes two blank lines in firenvim in some situations. For example, opening this:
becomes this in firenvim:
And, predictably, if I write the results of that editing session without first deleting the extra two lines, I end up with extra newlines back in the firefox text box:
Additional observations
Note that it is only empty lines which are doubled - two adjacent non-empty lines do not have an extra newline inserted between them (honestly, this confuses me more than if every newline were doubled!).
Also, this isn't universally the case - some text boxes work fine, but other times I see the blank line-doubling behavior. You can visit https://jupyter.org/try-jupyter/notebooks/?path=notebooks/Intro.ipynb to test a problematic case - edit the text field with the first line of "from matplotlib import pyplot as plt" in Firefox.
I am able to use firenvim in Chromium and do not observe the same behavior as I do in Firefox. I also noticed while testing this that in Firefox, firenvim has the filetype set to
text
, while chromium has it set topython
... I don't know if that's a clue or just some other difference.