mogenslund / liquid

Clojure Text Editor, for editing clojure code and markdown. Written entirely in Clojure with inspiration from Emacs and Vim.
Eclipse Public License 1.0
959 stars 42 forks source link

Typeahead app opens only in the first main window #22

Closed tom-adsfund closed 5 years ago

tom-adsfund commented 5 years ago

If I "split below", then C-space, the typeahead opens in the new window, but the action is done only in the previous window, leaving the typeahead open in the new window.

The typeahead should open non-prompt buffers in whichever window the typeahead is used in.

mogenslund commented 5 years ago

OMG! This probably makes it obvious that I do not use splitting windows much myself :-) Thank you!

I think it is an easy fix. The typeaheadapp finds the previous buffer and navigates back to that. If the buffer is already visible in some window, it will switch to that. Since typeaheadapp occupies the current window, Liquid will switch to the other one, where the buffer is also present after the splitting.

I just need to make a variant of switch-to-buffer that does not try to be clever and change window. I guess it will be a matter of copy/paste, remove some code and use the new function from typeaheadapp.

mogenslund commented 5 years ago

I have commitet a fix now and updated liq.jar