Instead of returning the current selection when a selector fails, return
an empty Optional<Selection>. That means object selections will now
remove the selections that dont match the object.
This commit allows buffers that were not previously written to disk to
be restored if a backup has been generated in their name. Consequently,
we got rid of a few non-POSIX calls to `find` (using `-maxdepth` or
`-delete`), and of the logic that detected the newest backup (which
didn't seem a good reason enough to steer away from a portable command).
Fixes#1236
Purging unused strings could get pretty expensive with a lot of
interned strings as it requiered iterating on all of them. Use
a flag on the refcount of the StringData to see if the string
is interned, and notify the StringRegistry in this case.
This should improve the speed of editing big files with many words,
such as the one described in #1195
Expanding the `kak_assert` macro to either an `if` statement or nothing
leads to issues when the macro is used in a conditional statement that
doesn't use braces.
Example: ncurses_ui.cc:476, in non debug mode, the macro will expand to
an empty line, resulting in the `ungetch` call not being executed if the
`ioctl` call succeeds (line 448).
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
A change that ended exactly where the previous one started was not
considered backward sorted. Leading to some very bad performances in
certain cases, like '100000o<esc>u'