This is a small patch provides the macro IS_ESCAPE to check whether a
GdkEventKey should be considered as an escape event. This patch also adds <C-[>
as an escape event.
When completing the command list, at the command prompt, ensure we malloc
and then realloc by not assuming this list is initially the length of
MAX_LIST_SIZE.
Instead, calculate the size of the command list at runtime, and use that
value to malloc correctly. This doesn't then attempt to overwrite any
memory when realloc()ing.
In complete() when trying to realloc() the code path means that we might
reach that point before having had that memory used -- so only print the
warning realloc() failed if both the original pointer and the new one are
both NULL.
But we explicitly assign the newly realloc()d pointer to temporary pointers
so that we don't clobber the original pointer. In the case originally of
overflowing MAX_LIST_SIZE, trying to realloc() beyond that, still using the
original pointer, meant that we lost all of the data. That's bad.
This does need a bit of a rethink in the future to get rid of the static
state of some of the function variables, but this patch doesn't need to
address that.
In recent versions of ld which now requires strict dynamic linker object
rules, we must tell the linker which libraries to explicitly link against.
This affects our use of X11, so link against that.
See: http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
Off by default, as this was always the case with Vimprobable. When turned
on, seems to improve my own browsing experience a little. I am sure it's
more than just a placebo. :)
When printing out Vimprobable's version via "-v" on the command-line, don't
assume that the useragent value will be the default. Instead, always use
INTERNAL_VERSION which is: "Vimprobable/VERSION".
Go back to using libsoup's "changed" signal handling on the file-store for
the on disk cookie-jar, and update our session-store as it's updated.
Request headers from URLs which contain cookies go straight into the file
cookie jar on disk.
This should help reduce the overhead of needing to read/write to the entire
file cookie store on disk each time.
Under unknown circumstances (like some computers running ibus),
event->state is 1<<25 (an unused bit) instead of 0. This patch modifies
the CLEAN macro to strip those unused bits, making vimprobable ignore
them.
This fixes a bug where, on those machines, vimprobable wouldn't accept
any keys.
Trying to calculate the size of an extern array at runtime is fatal -- it's
also going to either evaluate to zero (if passed by pointer) or fail at
compilation, because sizeof is compile-time only.
Therefore, give the commands[] array a pre-calculated size -- which can
then be used properly when trying to set any "map" lines encountered in
Vimprobable's config file.
Don't moan if RCFILE cannot be opened -- instead, use give_feedback() if an
explicit config file was passed on the command-line, but couldn't be opened.
For everything else, use an explicit error, because we assume the file
could be opened, but not parsed for some reason.