You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a little bizarre, so bear with me. If I try to insert a JavaScript object inside another JavaScript object in a script tag in an HTML file after having opened another JavaScript file first, nvim will hang. I can see in top that its CPU usage spins up to 100%. The steps below will probably make this more clear.
nvim --version: 0.3.1
Vim (version: 8.0) behaves differently? Yes, I wasn't able to reproduce this in Vim8
Operating system/version: Ubuntu 18.04
Terminal name/version: GNOME Terminal 3.28.2
$TERM: xterm-256color and screen-256color
Steps to reproduce using nvim -u NORC
nvim -u NORC foo.js
:vs index.html
Add the following lines to index.html
<script>varx={}</script>
Insert a property y: {} into the object x
<script>
var x = {
+ y: {+ }
}
</script>
Actual behaviour
As soon as you hit enter after the opening { in y: {, nvim becomes unresponsive.
This only happens if you have opened another JavaScript file first. If you nvim -u NORC index.html and then :vs foo.js and add the same HTML to index.html, it works fine. Also, if you insert the } before you insert the {, it works fine.
And if you start nvim with -u NONE instead of NORC, it works.
Expected behaviour
Nvim should continue to function normally after typing y: {\n.
Updated 21 Nov. 2018 16:42 -0700 to correct the steps to reproduce, see my comment below.
The text was updated successfully, but these errors were encountered:
FWIW, I can't reproduce it with 0.3.1 from Homebrew, but since it happens on an opening bracket, it might be related to the standard plugin matchparen (:h matchparen).
Does executing :NoMatchParen before adding the y: {} line avoid the issue?
I just realized there was a subtle error in how I described reproducing the bug. It's not entering the { that causes nvim to hang, it's hitting enter after the {. So the lines you're actually adding are:
<script>
var x = {
+ y: {+ }
}
</script>
So really this has something to do with inserting a new line after the {. I can enter y: {} just fine, but as soon as I try to add a newline in between the {} it crashes.
Setting :NoMatchParen doesn't change anything for me.
This is a little bizarre, so bear with me. If I try to insert a JavaScript object inside another JavaScript object in a script tag in an HTML file after having opened another JavaScript file first, nvim will hang. I can see in
top
that its CPU usage spins up to 100%. The steps below will probably make this more clear.nvim --version
: 0.3.1$TERM
: xterm-256color and screen-256colorSteps to reproduce using
nvim -u NORC
nvim -u NORC foo.js
:vs index.html
index.html
y: {}
into the objectx
Actual behaviour
As soon as you hit enter after the opening
{
iny: {
, nvim becomes unresponsive.This only happens if you have opened another JavaScript file first. If you
nvim -u NORC index.html
and then:vs foo.js
and add the same HTML toindex.html
, it works fine. Also, if you insert the}
before you insert the{
, it works fine.And if you start nvim with
-u NONE
instead ofNORC
, it works.Expected behaviour
Nvim should continue to function normally after typing
y: {\n
.Updated 21 Nov. 2018 16:42 -0700 to correct the steps to reproduce, see my comment below.
The text was updated successfully, but these errors were encountered: