ehuss / Sublime-Wrap-Plus

Enhanced "wrap lines" command for Sublime Text 2 or 3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crashes triggered by certain lines

heyimalex opened this issue · comments

Happens occasionally on seemingly random lines when doing an alt-q wrap with Wrap Plus. Sublimetext completely hangs, cannot recover, and needs to be killed and restarted. It's clear that the line triggers it as restarting Sublime and doing a hard wrap again on the same line will repeatably crash the program. Disable Wrap Plus and it works fine.

I managed to find an example case, saved as ex.yml

  # Could harden more by adding sshusers group, but we really want the BARE minimum to be manageable.

Things of note: There are two spaces in front of the comment, and an empty line after. Without the line after, it will not crash. I'm highlighting the entire line when wrapping, but if I instead highlight from the hash, it doesn't crash.

Also notable is that I'm using WrapPlus.wrap_width. For reference, here are my user settings.

{
    "WrapPlus.wrap_width": 72,
    "default_line_ending": "unix",
    "font_size": 11,
    "tab_size": 4,
    "translate_tabs_to_spaces": true,
    "word_wrap": true,
    "wrap_width": 80
}

Windows 8.1, ST3 Build 3065, Wrap Plus 2014.08.22.19.03.10

I don't have time to dig deeper into this at the moment, but may check into it a little later in the week if no one else does.

I get this too - this is an example line:

    # If True, removes datasource id ranges from multi-criteria scans and instead parses the returned rows to

Select the whole thing, wrap == hang.

This in on Ubuntu 13.10, x64, ST3 Build 3065, Wrap Plus 2014.08.22.19.03.10

I pushed an update that should fix this, let me know if it doesn't work.

Sorry about the issues. The code has become a complete mess as it supports more and more edge cases. Just FYI, if it ever hangs, you can kill the plugin_host process to shut down the plugin so you don't lose any work.