Ticket #2567 (closed defect: worksforme)
Syntax highlighting disappears after undo operation.
Reported by: | laborer | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | mcedit | Version: | 4.7.5.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Steps to reproduce:
- Create trivial 111.cpp file with text
#ifdef SOME ddd
- mcedit 111.cpp
- Move cursor to position 2,2
- backspace, backspace, ctrl+u
- subj
Also look at the screenshots.
Attachments
Change History
Changed 13 years ago by laborer
- Attachment before.png added
comment:1 Changed 13 years ago by laborer
Also,
tphost tmp # LANG=en mc -V GNU Midnight Commander 4.7.5.2 Built with GLib 2.28.6 Using the ncurses library With builtin Editor With subshell support as default With support for background operations With mouse support on xterm With support for X11 events With internationalization support With multiple codepages support Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, fish, smbfs Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64; tphost tmp # tphost tmp # uname -a Linux tphost 2.6.38.5 #1 SMP Tue May 3 23:26:29 MSD 2011 x86_64 Intel(R) Core(TM) i3 CPU M 390 @ 2.67GHz GenuineIntel GNU/Linux tphost tmp # cat /etc/gentoo-release Gentoo Base System release 2.0.2
comment:4 Changed 13 years ago by angel_il
- Owner set to angel_il
- Status changed from new to accepted
comment:5 Changed 13 years ago by angel_il
2 laborer, try follow
diff --git a/src/editor/edit.c b/src/editor/edit.c index 2bc97fd..2a15df2 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -1261,10 +1261,12 @@ edit_do_undo (WEdit * edit) case BACKSPACE: case BACKSPACE_BR: edit_backspace (edit, 1); + count++; break; case DELCHAR: case DELCHAR_BR: edit_delete (edit, 1); + count++; break; case COLUMN_ON: edit->column_highlight = 1; @@ -1274,9 +1276,15 @@ edit_do_undo (WEdit * edit) break; } if (ac >= 256 && ac < 512) + { edit_insert_ahead (edit, ac - 256); + count++; + } if (ac >= 0 && ac < 256) + { edit_insert (edit, ac); + count++; + } if (ac >= MARK_1 - 2 && ac < MARK_2 - 2) {
comment:6 Changed 13 years ago by laborer
This does not solve the problem.
Tested with mc 4.7.5.2 with some modification(no BACKSPACE_BR/DELCHAR_BR) and latest git version.
comment:7 Changed 13 years ago by angel_il
this
if (ac >= 256 && ac < 512) + { edit_insert_ahead (edit, ac - 256); + count++; + } if (ac >= 0 && ac < 256) + { edit_insert (edit, ac); + count++; + }
should be enough
comment:8 Changed 13 years ago by angel_il
This does not solve the problem.
what do you mean.
this solve for your testcase... or not ?
comment:9 Changed 13 years ago by laborer
what do you mean.
I have not noticed any changes with this patch. Maybe I'm wrong, but i do not know. It seems not.
this solve for your testcase... or not ?
No.
comment:11 Changed 8 years ago by andrew_b
- Owner angel_il deleted
- Status changed from accepted to assigned
comment:12 Changed 4 months ago by zaytsev
- Status changed from assigned to testing
- Resolution set to worksforme
- Milestone Future Releases deleted
This is now working correctly on 4.8.31.
Note: See
TracTickets for help on using
tickets.
normal syntax highlighting