tabs.kak icon indicating copy to clipboard operation
tabs.kak copied to clipboard

tab bar does not scroll horizontally

Open dead10ck opened this issue 4 years ago • 8 comments

When there are more buffers open than can fit into the bar, the ellipsis just stays at the beginning, and does not attempt to move so that you can see the current buffer highlighted. It should probably instead move which section of the bar is hidden with ellipses, so that when you are looking at a buffer near the beginning of the list, the ellipses are shown at the end, and if you are in the middle of a long list, ellipses should be shown at both left and right ends.

dead10ck avatar Apr 07 '21 15:04 dead10ck

This is a known problem. I've thought a lot about how to implement this but I'm unsure what the best way is. I'll try see if I can implement a fix for this over the weekend. Thanks for raising this.

enricozb avatar Apr 07 '21 17:04 enricozb

Ok, I've tried implementing something to solve this. Please have a look at the readme under the Overflow and Reserving Space for Tabs sections of the readme, and update to this commit (f9396b23ab205f65b031f3ce2ea0e41d42abfdf0) implements the behavior you want with the scroll mode.

Note that the scroll mode depends on luar, so please plug that as well.

enricozb avatar Apr 14 '21 15:04 enricozb

Hi @enricozb thanks so much for working on this! I tried out the latest master, and it looks like scroll mode is not working. I have this config:

plug "gustavo-hms/luar" %{
    require-module luar
}

plug "enricozb/tabs.kak" %{
  set-option global modelinefmt_tabs '%val{cursor_line}:%val{cursor_char_column} {{context_info}} {{mode_info}}'
  set-option global tabs_overflow "scroll"
  map global user t ': enter-user-mode tabs<ret>' -docstring 'tabs'
  map global user T ': enter-user-mode -lock tabs<ret>' -docstring 'tabs (lock)'
}

and it looks like it is still shrinking instead of scrolling.

dead10ck avatar Apr 15 '21 01:04 dead10ck

Thanks for trying this out! Can you send a screenshot of the behavior?

enricozb avatar Apr 15 '21 02:04 enricozb

Sure, here's one. We can see all the names are cut off on the left.

image

dead10ck avatar Apr 16 '21 13:04 dead10ck

@enricozb Seems this got removed when you did the clean slate commit. Any plans on it coming back?

skarekrow avatar Oct 07 '24 20:10 skarekrow

@skarekrow Which branch/commit are you using?

enricozb avatar Oct 09 '24 14:10 enricozb

@enricozb I'm using the latest on main: 88ad99561f48efaed36713f59c7f217f50be719b

skarekrow avatar Oct 09 '24 17:10 skarekrow