-
Notifications
You must be signed in to change notification settings - Fork 37
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
Enable Tab completion with favourites #89
Conversation
Renaming struct history to struct pagelist_entry
There is support for reading history in the legacy format, with an ad-hoc detection of the legacy format that really sucks.
Also, minor fixes in loading new-style favourites.
(and the code to do it).
Conflicts: xombrero.c
I think I like the gist of this but I would like to split this out and fix the remaining issues. If you are fighting git a lot I am ok with diffs in email too. |
Hm -- so, the two issues I'm mentioning above are: (1) the locale-dependent strptime -- that I'd gladly fix (though I (2) The trouble that the gtk completion model and the "command line" Would leaving (2) open be acceptable? Edit (2015-04-14): (1) is worse than I'd have expected. I don't think there The only good solution occurring to me is changing the on-disk format to store Easier, but hackier, would be to set LC_TIME; but that'd break history files So -- I'm happy to implement either time_t or ISO time storage for |
Superseded by #91 |
The main point in this pull request is to enable tab completion of items
in the list of favourites.
To do this, in commits f7c193c,
6f09b31, and
9473e2b I made the existing code for
handling the history generic enough so it can be used for the
favourites, too.
In commit 5da430d, the favourites list
is actually managed in memory; this results in a change in the favourite
file's on-disk format. There's code to heuristically decide which
format a concrete favourites list has, but I give you it's not perfect.
Then, in commit 785ae79 the in-memory
favourites are used to complete URIs.
Now, I like to match any part of a URI when completing. Hence, in
commit 537c2d3 I add a config option
complete_uri_anywhere defaulting to false (current xombrero behaviour).
If you set it to 1, URI expansion will happen based on matches anywhere
in the URIs.
Drawbacks/remaining problems:
load_pagelist_from_disk breaks in non-English locales, as has been the
case for loading history before, as strptime is locale-dependent. I'm
happy to clean this up at this point, but as (essentially) no new
breakage is introduced, I'd say it's an independent problem.
It would be good to be able to use the completion model from complete.h
to complete URLs in cmd_getlist rather than manually going through the
two pagelists (frankly, the fact that completion_add_uri didn't have an
effect on completing "open" was really confusing to me). Alas, I've not
found an API to get to the actual char_s from a GtkTreeView, so after
completion we'd have to free all the gchar_, which seemed an unnecessary
code complication.
Since I'm a professing git idiot, the pull request contains some commits
that shouldn't have gone in: bba1935
and 3342d90, plus the horrible mess
I've made today. Before I actually try the magic to fix the history or
create a synthetic branch, could you see if you can just cherry-pick the
actually useful commits?