Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window-prev-buffers bleeds across workgroups #84

Open
ivanbrennan opened this issue May 20, 2017 · 0 comments
Open

window-prev-buffers bleeds across workgroups #84

ivanbrennan opened this issue May 20, 2017 · 0 comments

Comments

@ivanbrennan
Copy link

I commonly toggle back and forth between two buffers in a single window, using

(switch-to-buffer (caar (window-prev-buffers)))

(I use evil-switch-to-windows-last-buffer, which mostly boils down to the above expression.)

I had hoped that switching buffers wouldn't affect which buffer was considered the "previous buffer" for any window outside of the current workgroup, but that's not the case.

For example, in workgroup-A I have a single window in which I toggle between buf-1 and buf-2:

(wg-switch-to-workgroup "workgroup-A")
(find-file "~/buf-1")
(find-file "~/buf-2")
(switch-to-buffer (caar (window-prev-buffers)))

Now I switch to workgroup-B and toggle between buf-3 and buf-4:

(wg-switch-to-workgroup "workgroup-B")
(find-file "~/buf-3")
(find-file "~/buf-4")
(switch-to-buffer (caar (window-prev-buffers)))

Upon returning to workgroup-A, which currently displays buf-1, I was expecting

(switch-to-buffer (caar (window-prev-buffers)))

to toggle to buf-2, but it instead toggles to buf-3. Since both workgroups are using the same window object, the list of previous buffers for that window is shared between them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant