| Age | Commit message (Collapse) | Author |
|
This works now.
|
|
This doesn't work yet as it turns out it requires a change to the
`incdec()` Perl subroutine.
We want to move point when switching between positive and negative
numbers (adding or removing a hypen negative sign), but only if point is
on or after the start of the number being incremented. If point is
before that, it looks like it's moving.
Read the start index from the `incdec()` subroutine and prefix it to the
output line in the format: "${start_position}#${output_line}". We can
then use the "#" to split the two values and extract them in the Bash
functions.
Needed to move setting `$READLINE_LINE` to the increment and decrement
Bash functions because I now run `__readline_incdec` in a subshell,
meaning the current line can't be manipulated with that variable in that
function.
In the increment and decrement Bash functions, we now check if the start
position of the incremented number is less than or equal to
`$READLINE_POINT` before trying to move point.
|
|
|
|
|
|
Split the bindings from the function definitions. This will allow users
to source the functions and define their own bindings. The bindings file
can be sourced to get the default bindings.
|
|
|
|
I had used `C-x +` and `C-x -` during testing because I had an existing
non-"-x" binding that was prefixed with `C-x a`, and when I tried to add
the `C-x a` "-x" binding, it caused the following error:
bash_execute_unix_command: cannot find keymap for command
Switch the default bindings to `C-x a` and `C-x x` because those are the
ones I originally wanted, since they don't appear to conflict with any
existing default Readline bindings, and they're similar to the Vim
increment and decrement commands.
|
|
|
|
Now that we have this working, remove the old functions, binding
definitions, and TODOs.
All TODOs here are handled. The old Bash functions and bindings were for
a Bash-only implementation. The point-moving code in
`__readline_incdec_decrement` wasn't applicable to decrementing numbers.
|
|
When I changed the file to an M4 file, it removed Bash syntax
highlighting, and the `include()` call interfered with Bash quote
matching. Use a different macro to include the Perl file so we can get
Bash syntax highlighting.
|