Age | Commit message (Collapse) | Author |
|
Fixes #652
|
|
Do not store all files in XDG_CONFIG_HOME.
|
|
The % is often used in urls and in case of the x-hint-command those are
feed to :shellcmd and will be replaced by current URL. This made the
x-hint-command unusable on some search engines.
The expansion of % to the current URL also required to give the current
browser state to the expansion logic and to feed it to all callers of
this too. This bloated the code.
This patch removes the % expansion which was a redundant alternative to
$VIMB_URI.
|
|
Allow to clear different types of website data base on the last update
time.
|
|
If vimb is started with --ephemeral option no files are created by
default and no persistent cookie manager is used.
|
|
|
|
Remove the mode arguments from util_file_prepend_line(),
util_file_pop_line() and util_file_set_content().
Both util_file_prepend_line() and util_file_pop_line() just calls
util_file_set_content() so stat(2) can be used there and if it
fails the 0600 is used as a fallback.
Thanks to @fanglingsu for reviews and suggestions!
|
|
The g_file_set_contents performs atomic write to file by creating a
temporary file, writing to it and renaming it. But during the creation
of the temporary file, the mode is set hard to 0666. So our files will
silently always change their mode in case we processed their content.
This patch adds the util_file_set_content() function which follows the
same approach, but allows to set the mode that is used to create the
temporary file. So the file is created with the right permissions.
|
|
Add a mode argument to util_get_filepath() in order to adjust file
permissions when creating file. Adjust all util_get_filepath()
call and file permissions making them readable and writable only
by the user.
|
|
This fixes #492.
|
|
Give only those information the util functions need to work.
|
|
|
|
This will allow us to used this in other parts too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use script message handler instead of dbus to track for focused editable
elements to switch vimb into input mode or back to normal mode.
|
|
|
|
|
|
|
|
|
|
|
|
New parameter is introduced to allow multiple configuration profiles per
user.
If vimb is started with this parameter new configuration directory
is created under default configuration directory. Cache and socket file
are kept separate per profile as well.
If vimb is started without this parameter, behaviour is unchanged.
Resolves fanglingsu/vimb#129
|
|
This makes it easier to maintain the code and to avoid memory leaks.
|
|
The previous duplication check where don on the generated list of history
items with callback function which is really slow for large history files. Now
the histories url is put into a hash table for a faster duplicate check.
Additional to this some unneeded memory allocation where removed. This makes
the code a little harder to maintain, but hey we don't want to wast time and
memory here.
|
|
|
|
This was only used to test the wildmatching, but the autocmd allow always to
match against list of patterns.
|
|
Change the matching functions to not end at the NUL of the pattern. In stead
we give a pattern length parameter. This allows to process multiple patterns
without the need to put NUL-bytes into it or to allocate memory for the parts
to match.
|
|
|
|
|
|
Added the new :set flavours :set option+=..., :set option-=..., set
option^=... like in vim.
|
|
|
|
|
|
Simplified some of the completions to avoid duplicate code.
|
|
The shell expansion was done via shell to keep complexity away from vimb, but
this allowed to run other shell commands too, what's a big security issue. To
avoid problems, the ~/, ~user, $ENV and ${ENV} expansions are done in the c
code o vimb.
|
|
|
|
|
|
New command allows to push new uri to the beginning of read it later list.
|
|
|
|
Don't translate file lines into history or bookmarks structs, if we have
enough unique items in the processed list (history max items). So it's not
necessary to convert the lines and to remove them in a second step from the
list.
|
|
Some of the functions where only used one time, so they where moved to the
place where they are used.
|
|
|
|
Renamed util_buil_path to util_build_path.
|
|
|
|
Now we distinct between history completion and bookmark completion.
1. Bookmark completion is triggered by ':open !<tab>' to complete all
bookmarks or by ':open !tag1 tag2' to complete only those bookmarks that
have tags with the prefixes tag1 and tag2.
2. History completion is changed to split the search query at the space char
and to search for all given words in the history. Only those history items
are completed, that match all given words or tags.
3. Search completion works now also tag based like the url and bookmark
completions.
|
|
The single previous %s placeholder for url shortcuts is now removed by
placeholders $0-$9 that make vimb browser more usable and the shortcut system
more flexible.
The $0 placeholder will be removed by all query parameter. So the previous
search engine feature can be build up with this new shortcut feature. For
example use 'dl=https://duckduckgo.com/lite/?q=$0' to define a shortcut for
the great duckduckgo search engine.
|