Femto-Emacs icon indicating copy to clipboard operation
Femto-Emacs copied to clipboard

Discarding changes on an file open twice in split buffers crashes Femto-Emacs

Open siraben opened this issue 6 years ago • 1 comments

Reproducing the following steps produces a segfault

  1. Open a file in Femto-Emacs (e.g. main.c)
  2. Split the buffer with C-x 2, the file should now be open in two buffers
  3. Make a change
  4. Kill the buffer with C-x k and answering y
  5. Move to the other buffer with C-x o
  6. C-x k and answering y produces the segfault.

What's interesting is that doing step 6 but answering n does not crash Femto-Emacs.

siraben avatar Feb 27 '18 10:02 siraben

Agreed this is a bug. fix is fairly simple. What is happening is that the code is not checking if any other window has a reference to the buffer that is being killed in the current window. It is probably about a 10 line fix. Will fix in the Femto repository when I get time. https://github.com/hughbarney/femto

hughbarney avatar Mar 05 '18 22:03 hughbarney