GNOME Bugzilla – Bug 762776
Using too large numeric modifier on vim command freezes the editor
Last modified: 2016-03-01 07:13:46 UTC
When I want to yank a whole file I regularly use the following vim shortcut: "111111yy" (assuming the file is shorter than 111111 lines). This is dirty but it certainly does the job quite well in vim. However when you do it in gnome-builder it freezes the application for quite some time. I figure that some routine is executed 111111 times. The number should be silently capped to the actual length of the file.
Created attachment 322554 [details] [review] movements: short circuit line movements with large repeat This could still be better, but we need to break out a bunch of the weird logic going on in here to make that possible. Most of the complexity is due to an impedance mismatch between GtkTextBuffer and vim.
This is much snappier, but still short of where it would be nice to go. While this is enough to mark this bug fixed, I'd love someone to come in and simplify the line movement logic for basic movements. It has a bunch of workarounds for small movements. Attachment 322554 [details] pushed as 003b7d6 - movements: short circuit line movements with large repeat
(In reply to Richard Wiedenhöft from comment #0) > When I want to yank a whole file I regularly use the following vim shortcut: > "111111yy" (assuming the file is shorter than 111111 lines). This is dirty > but it certainly does the job quite well in vim. Just for the record, the correct way to do this would be ggVGy