Re: [hackers][vis][PATCH] Implement a first version of the 'gf' family of commands

From: Marc André Tanner <>
Date: Wed, 3 Feb 2016 16:52:21 +0100

On Wed, Feb 03, 2016 at 09:22:19AM +0100, Silvan Jegen wrote:
> On Tue, Feb 2, 2016 at 11:18 PM, Marc André Tanner <> wrote:
> > Instead of introducing these one should write a
> >
> > Filerange text_object_filename(Text *txt, size_t pos)
> >
> > which would also take care of any needed offsets. Also I'm not sure
> > whether using the "customword" functions is a good idea due to their
> > behavior if you are already at the start/end of the word.
> Yes, their behavior surprised me. I will look into implementing that function.

Well they also need to work if you are already on the first/last
character of a word which is not what you want in this case.

Checkout text_object_range it should apply to your use case.

> > Maybe the actual file opening should be implemented using the :edit
> > command via vis_cmd(...) this would also take care about detecting
> > unsaved changes etc.
> That's what I wanted to do at first but then I saw that
> "info_unsaved_changes" would show "... (add ! to override)" which does
> not make sense. I will think about how to deal with that.

Then rename/export is_view_closeable from vis-cmds.c to something like
vis_window_closable and use it from main.c.

 Marc André Tanner >< >< GPG key: 10C93617
Received on Wed Feb 03 2016 - 16:52:21 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 03 2016 - 17:00:14 CET