This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 28973 - "bookmark-next" keyword in macro definition does not work as expected
Summary: "bookmark-next" keyword in macro definition does not work as expected
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Macros (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-23 16:59 UTC by sergionalin
Modified: 2008-11-11 14:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sergionalin 2002-11-23 16:59:24 UTC
"bookmark-next" in a macro will leave the cursor at its 
current position. 
It seems this happens only during macro execution, as soon 
as the macro finishes cursor il correctly positioned to 
the bookmarked line.

Example macro:
caret-begin-line caret-down bookmark-toggle caret-down 
caret-down caret-down caret-down caret-down bookmark-next 
bookmark-toggle "Now I'm here"

Example text:
-----------------   TEXT START ---------------------------
Place cursor HERE (anywere on this line) and run macro.
Macro will create a bookmark HERE, then move cursor down 5 
lines
..
..
..
..
cursor moved HERE. Now macro will invoke bookmark-next 
(thus returning to second line) 
then remove the bookmark invoking toggle-bookmark and 
by last print out "Now I'm here". Work as expected ?
-----------------   TEXT END   ---------------------------

Expected text:
-----------------   TEXT START ---------------------------
Place cursor HERE (anywere on this line) and run macro.
Now I'm hereMacro will create a bookmark HERE, then move 
cursor down 5 lines
..
..
..
..
cursor moved HERE. Now macro will invoke bookmark-next 
(thus returning to second line) 
then remove the bookmark invoking toggle-bookmark and 
by last print out "Now I'm here". Work as expected ?
-----------------   TEXT END   ---------------------------

What we get is:
-----------------   TEXT START ---------------------------
Place cursor HERE (anywere on this line) and run macro.
Macro will create a bookmark HERE, then move cursor down 5 
lines
..
..
..
..
Now I'm herecursor moved HERE. Now macro will invoke 
bookmark-next (thus returning to second line)
then remove the bookmark invoking toggle-bookmark and 
by last print out "Now I'm here". Work as expected ?
-----------------   TEXT END   ---------------------------
Comment 1 ehucka 2003-01-29 15:24:37 UTC
Reproducible in dev build 200301290100 on Linux.
Comment 2 Martin Roskanin 2003-02-26 10:36:00 UTC
Yes, it could be a race condition problem. I will look at this. Also I
am changing the priority to default P3. 
Comment 3 Martin Roskanin 2003-02-28 15:39:35 UTC
At this time only P1s and P2s are allowed to be integrated into newly
created branch "release35". 
http://www.netbeans.org/servlets/ReadMsg?msgId=475395&listName=nbdev
Changing target milestone to 4.0

Comment 4 Roman Strobl 2004-12-07 15:19:45 UTC
Changing subcomponent to macros.
Comment 5 Jan Becicka 2007-10-23 15:37:18 UTC
Is this still reproducible?
Comment 6 Vitezslav Stejskal 2007-10-24 10:47:15 UTC
No, it does not work in my build, sorry.
Comment 7 Jan Jancura 2008-08-01 13:52:48 UTC
Looks like there are more issues now. "bookmark-next" action is not registerred, so it can not be called...
Comment 8 Miloslav Metelka 2008-11-11 14:19:06 UTC
Sorry, bookmark related actions are not supported in macros.