Vim pegs the CPU when typing ( open paren
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vim (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: vim
Vim pegs the CPU at 100% for about 30 to 60 seconds when I type an open parentheses '(' in a certain location in the file.
baron@kanga:~$ dpkg -l | grep vim
ii vim-common 1:7.1-138+1ubuntu3 Vi IMproved - Common files
ii vim-full 1:7.1-138+1ubuntu3 Vi IMproved - enhanced vi editor (transition
ii vim-gnome 1:7.1-138+1ubuntu3 Vi IMproved - enhanced vi editor - with GNOM
ii vim-gui-common 1:7.1-138+1ubuntu3 Vi IMproved - Common GUI files
ii vim-runtime 1:7.1-138+1ubuntu3 Vi IMproved - Runtime files
ii vim-tiny 1:7.1-138+1ubuntu3 Vi IMproved - enhanced vi editor - compact v
I'm on 8.04.
To repro (another user repro'ed, by the way), place the cursor after this text in the attached file:
CREATE TABLE checksum (
db char(64) NOT NULL,
tbl char(64) NOT NULL,
chunk int NOT NULL,
boundaries char(64) NOT NULL,
this_crc char(40) NOT NULL,
this_cnt int NOT NULL,
master_crc char(40) NULL,
master_cnt int NULL,
ts timestamp NOT NULL,
PRIMARY KEY (db, tbl, chunk)
);
Now type
create table argtest (
And watch it hang.
After it becomes responsive again, you can start a new line and type
db char(64) NOT NULL,
And it'll do the same thing at the (.
I could not reproduce it somehow, but the bug description sounds an awful lot like the following bug which was fixed in vim-7.1.227 on Jan 13 2008:
Patch 7.1.227
remembered states.
Problem: Hang in syntax HL when moving over a ")". (Dominique Pelle)
Solution: Avoid storing a syntax state in the wrong position in the list of
Files: src/syntax.c