Ticket #323 (closed defect: fixed)

Opened 16 years ago

Last modified 13 years ago

mcedit - Record and playback macro works first few times only

Reported by: nkirk01 Owned by: angel_il
Priority: major Milestone: 4.8.0-pre1
Component: mcedit Version: master
Keywords: Cc: sxmboer, zaytsev
Blocked By: Blocking:
Branch state: no branch Votes for changeset: committed-master

Description

Open a utf-8 text file in mcedit from mc, record a macro to change some text on each line of the file, then run the macro okay for perhaps 4 times, then the macro no longer works correctly, starts deleting characters in the file sequentially instead, cannot exit macro run mode.

Debian Lenny system - i386 - locale is en_US - with KDE4
Running mc in a KDE konsole.

Using todays Git repo version 4.6.2 (April 7, 2009) which I built from the Git repo sources with libslang2.

GNU Midnight Commander 4.6.2
Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish
With builtin Editor
Using system-installed S-Lang library with terminfo database
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
Data types: char 8 int 32 long 32 void * 32 off_t 64 ecs_char 8

Thanks.

Attachments

editcmd.patch (378 bytes) - added by sxmboer 16 years ago.
mc-4.6.2-patch-ticket#323 (487 bytes) - added by sxmboer 16 years ago.
0001-changed-mcedit.1.in.patch (4.0 KB) - added by angel_il 14 years ago.
man

Change History

Changed 16 years ago by sxmboer

comment:1 Changed 16 years ago by sxmboer

The problem with the macros was that the keystroke CTRL-R was saved along with the macro, causing it to restart recording a macro.

This patch breaks the behavior of the macro saving when the user does that through the menu. So somewhere a conditional needs to be added, but I don't know where or what.

Changed 16 years ago by sxmboer

comment:2 Changed 16 years ago by sxmboer

  • Status changed from new to accepted
  • Owner set to sxmboer

This patch obsoletes the previous patch to editcmd.
This patch looks for the keyboard command within the macro and deletes it if it is present. This writes the correct macro regardless of using the keyboard (CTRL-R) to stop recording or the menu.

comment:3 follow-ups: ↓ 4 ↓ 5 Changed 16 years ago by sxmboer

  • Status changed from accepted to testing
  • Resolution set to fixed

comment:4 in reply to: ↑ 3 Changed 16 years ago by styx

  • Status changed from testing to reopened
  • Keywords review added
  • Resolution fixed deleted

Replying to sxmboer:

I think you need to read this:
http://www.midnight-commander.org/wiki/WorkingGuideLines

When you have finished something, you are just setting review tag.

Thank you work.

comment:5 in reply to: ↑ 3 Changed 16 years ago by styx

Replying to sxmboer:

  • Thank you for your work

comment:6 Changed 15 years ago by winnie

  • severity set to on review

comment:7 Changed 15 years ago by iNode

  • Keywords review removed
  • severity changed from on review to no branch

There is no branch to review.

comment:8 follow-up: ↓ 10 Changed 15 years ago by sxmboer

Retested in 4.7.0pre4.
Macro recording is now completely broken.

comment:9 Changed 15 years ago by angel_il

  • Status changed from reopened to accepted
  • Owner changed from sxmboer to angel_il
  • Version changed from 4.6.2 to master
  • Milestone changed from 4.7 to 4.7.0

comment:10 in reply to: ↑ 8 Changed 15 years ago by angel_il

Replying to sxmboer:

Retested in 4.7.0pre4.
Macro recording is now completely broken.

i want fix it, but can you show me what's wrong?
how to reproduce this, step by step?...

comment:11 Changed 15 years ago by angel_il

  • Cc sxmboer added
  • Milestone changed from 4.7.0 to 4.7

comment:12 Changed 15 years ago by angel_il

Nathan Kirk wrote:

Sure, to reproduce the issue:
- from Midnight Commander press F4 to edit a file
- press Ctrl-R to start recording
- add some text, move around
- press Ctrl-R to stop recording and save the macro as key: "a". ("a" is arbitrary)
- Then, to replay the macro, press "Ctrl-A a" for the first replay.
- Continue pressing "Ctrl-A a" to keep replaying the same macro
After the first few times the macro fails to complete normally, and will eventually lock up the editor session.

Hope this helps.

comment:13 Changed 14 years ago by zaytsev

  • Cc zaytsev added

comment:14 Changed 14 years ago by zaytsev

With Ubuntu 8.10 Release: 8.10, and Kubuntu 8.10 in terminal mode, 
mcedit freezes when macro's are used.

When i use Cntr-R (start macro) a macro is recorded, and with 
Cntr-R (close macro) and then A it's saved.

With Cntr-A A it should repeat the macro that was previously 
recorded in A.

With Cntr-A A (execute macro A) mcedit freezes after executing
it 2 or 3 times.

comment:15 Changed 14 years ago by ddanila

FYI: Just reproduced on 4.7.5-33-g2e85893

comment:16 Changed 14 years ago by angel_il

comment:17 Changed 14 years ago by angel_il

  • severity changed from no branch to on review

branch: 323_editor_macros
changeset: http://www.midnight-commander.org/changeset/323_editor_macros

please review

Changed 14 years ago by angel_il

man

comment:18 Changed 14 years ago by slavazanko

  • Votes for changeset set to slavazanko
  • Milestone changed from 4.7 to 4.8.0-pre1

comment:19 Changed 14 years ago by slavazanko

  • Votes for changeset slavazanko deleted

comment:20 Changed 14 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:21 Changed 14 years ago by andrew_b

  • Votes for changeset changed from slavazanko to slavazanko andrew_b
  • severity changed from on review to approved

comment:22 Changed 14 years ago by angel_il

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko andrew_b to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:23 Changed 14 years ago by andrew_b

#2512 fixes problem with interactive scripts.

comment:24 Changed 13 years ago by angel_il

  • Status changed from testing to closed
  • Branch state set to no branch
Note: See TracTickets for help on using tickets.