amp icon indicating copy to clipboard operation
amp copied to clipboard

shift r causing Segmentation fault 11 on macOS

Open jesselucas opened this issue 6 years ago • 2 comments

amp version 0.3.4 macOS 10.13.3 alacritty 0.1.0

When amp opens a file pressing the key combinationshift-r causes amp to crash. The terminal shows Segmentation fault: 11

jesselucas avatar Mar 20 '18 18:03 jesselucas

Sadly, this is an issue with git2 and onig library symbols conflicting. Avoiding static linking for either of these libraries should do the trick, although I've not looked into that (it should just be an environment variable that rustc will pass along to the linker).

The good news is, if the syntect library adopts fancy-regex, we won't be using onig any longer and this issue will go away. For what it's worth, this has only occurred on OS X for me.

jmacdonald avatar Mar 22 '18 01:03 jmacdonald

Thanks @jmacdonald! That's great news!

As a temporary fix I changed the behavior of R to mimic r and redo. Another reason to love amp! The config.yml let's you change anything!

If anyone else has this issue on macOS here's my temporary work around using a custom config.yml:

keymap:
  normal:
    R: buffer::redo
  select:
    R: buffer::redo
  select_line:
    R: buffer::redo

jesselucas avatar Mar 22 '18 03:03 jesselucas