[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [RFC] improved word bounds
From: |
Brand Huntsman |
Subject: |
Re: [Nano-devel] [RFC] improved word bounds |
Date: |
Sun, 29 Jul 2018 15:36:48 -0600 |
On Sun, 29 Jul 2018 20:27:28 +0200
Benno Schulenberg <address@hidden> wrote:
> Actually trying your patch, I don't see Ctrl+Left/Right stopping
> at parentheses or commas, so that is fine.
The patch only implements proposal #1, stopping at commas/parens would
partially happen with #2 (if whitespace on left or right) and fully with #3.
> I like it that it that Ctrl+Left/Right stop at the end of a line
> (but not when it also stops at the character just before it).
Do you have an example of when it stops at the character before end of line?
Having a short word such as "a" at the end of line would cause this, but there
is no way to fix that, and any hack to work around it would produce illogical
behavior.
> Nor do I like that it stops twice on
> a line that consists of a single opening or closing brace.
That is another example of the above case. Any hack to fix this would negate
the whole purpose of the patch.
> But I don't like it that it sees the "#" in for example "#ifdef"
> as a separate word -- it should not see the character at all, just
> like parentheses and commas.
This is intended behavior of the patch but also a bug. The "#" or any other
non-word characters at start of line and touching a word on their right side
become a stop, and like the above cases, can't be fixed without breaking the
patch. It should stop when moving right and left, but currently only happens
when moving right.
> If you can reduce the patch to just the stopping-at-line's-end
> behavior, then I'm interested.
That isn't how the patch works and has nothing to do with its purpose.