onivim / libvim

libvim: The core Vim editing engine as a minimal C library
https://v2.onivim.io
MIT License
691 stars 34 forks source link

feat: add tabpage callback for :tab* commands #211

Closed glennsl closed 4 years ago

glennsl commented 4 years ago

This adds a tabpage callback that's called for the :tab* ex commands as well as gt and gT.

Status:

glennsl commented 4 years ago

I think we might just have to copy get_tabpage_arg, and construct a tabpage request instead of finding the tab number. Will try to explore that avenue

bryphe commented 4 years ago

Nevermind, it actually does work. it just wasn't picked up by the Oni2 build, which randomly happens. This will also block valid error messages though...

I believe this should be OK - I picture us handling the tab management wholly in Onivim, so we can put error messages from that side. As long as we get the correct 'intent' from the user for all of these, we should be in a good place to handle it.

glennsl commented 4 years ago

This should now correctly implement everything. Wasn't so difficult once I got a reliable, although tedious, worklfow going (rm -rf _esy && esy i && ...) and reevaluated some of the assumptions I had made based on the unreliable workflow.

bryphe commented 4 years ago

This should now correctly implement everything. Wasn't so difficult once I got a reliable, although tedious, worklfow going (rm -rf _esy && esy i && ...) and reevaluated some of the assumptions I had made based on the unreliable workflow.

Sorry about the workflow issues here - I've noticed too that sometimes the binaries can get out-of-date, for whatever easy - I think there may actually be a bug in esy when linking to a C dependency like this.

I'll add some notes in the README: https://github.com/onivim/libvim/pull/212

glennsl commented 4 years ago

I think there may actually be a bug in esy when linking to a C dependency like this.

Yeah I think so too. What makes it even more misleading is that it always builds the latest, reports errors correctly and all that, but it just doesn't pick up the correct binaries afterwards.

glennsl commented 4 years ago

Will you do a release so I can update https://github.com/onivim/oni2/pull/2030 @bryphe?

bryphe commented 4 years ago

Sure thing @glennsl - it's published now as libvim@8.10869.51 👍