howl-editor / howl

The Howl Editor
http://howl.io
Other
712 stars 68 forks source link

Insertion into read-only buffer works #155

Closed refi64 closed 8 years ago

refi64 commented 8 years ago

Basically, I noticed that, if you run an external command with Howl, you can insert text into the ProcessBuffer, even though it's read-only. Interestingly, you CANNOT replace text...because it's read-only!

This seems to be because howl.Editor.insert calls aullar.View.insert, which always calls aullar.Buffer.insert instead of howl.Buffer.insert. This skips the check to make sure that the buffer is writable.

nilnor commented 8 years ago

After looking at it the problem is not that the Editor.insert does not check the status (which is also a problem), but that the key presses and corresponding inserts are handled by the aullar view. So, we have to move down some read-only support into aullar, or add some kind of veto-notification thing.