Ticket #2483 (closed enhancement: fixed)
not intuitive behavior EditWordLeft, EditWordRight
| Reported by: | angel_il | Owned by: | angel_il |
|---|---|---|---|
| Priority: | trivial | Milestone: | 4.8.0-pre1 |
| Component: | mcedit | Version: | 4.7.5 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Branch state: | Votes for changeset: | committed-master committed-stable |
Description (last modified by angel_il) (diff)
not intuitive behavior EditWordLeft?, EditWordRight?
The cursor not stop beside BOL, EOL after "word left"/"word right".
Change History
comment:3 Changed 15 years ago by angel_il
- Description modified (diff)
branch: 2483_editor_word_left_improvement
comment:7 Changed 15 years ago by slavazanko
- Status changed from new to assigned
- Owner set to angel_il
comment:8 Changed 15 years ago by andrew_b
- Votes for changeset set to andrew_b
- Milestone changed from 4.8 to 4.8.0-pre1
comment:9 Changed 15 years ago by slavazanko
- Votes for changeset changed from andrew_b to andrew_b slavazanko
- severity changed from on review to approved
comment:10 Changed 15 years ago by angel_il
- Status changed from assigned to testing
- Votes for changeset changed from andrew_b slavazanko to commited-master
- Resolution set to fixed
- severity changed from approved to merged
comment:11 Changed 15 years ago by angel_il
- Status changed from testing to closed
- Votes for changeset changed from commited-master to committed-master committed-stable
cherry-pick into 4.7.5.2: 078115bfd78df4383dd02f31f7123d6a71dec52a
Note: See
TracTickets for help on using
tickets.

diff --git a/src/editor/edit.c b/src/editor/edit.c index 9f083af..3f20b54 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -1054,6 +1054,8 @@ edit_left_word_move (WEdit * edit, int s) c2 = edit_get_byte (edit, edit->curs1); if (!(my_type_of (c1) & my_type_of (c2))) break; + if (c1 == '\n' || c2 == '\n') + break; if (isspace (c1) && !isspace (c2)) break; if (s) @@ -1088,6 +1090,8 @@ edit_right_word_move (WEdit * edit, int s) break; c1 = edit_get_byte (edit, edit->curs1 - 1); c2 = edit_get_byte (edit, edit->curs1); + if (c1 == '\n' || c2 == '\n') + break; if (!(my_type_of (c1) & my_type_of (c2))) break; if (isspace (c1) && !isspace (c2))