apache / apache/netbeans

Split window cursor repositioning when using CTRL-Z

Open
#6,711 4 comments 1 reaction 0 assignees View on GitHub
Editor kind:bug needs:triage UI
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 19

### What happened

When I split (or clone) an editor window, then edit something in the file, then use CTRL-Z or SHIFT-CTRL-Z to backout a typo or redo an edit, the split (or cloned) window repositions the cursor location to where the action happened. What I expected was that the split window would remain positioned wherever I had set it. Which it does while doing the edits - but not when using the CTRL-Z.

### How to reproduce

Open any file to edit it.
Split the editor window, either horizontal or veritical, or clone it. If you clone it, you will have to undock the cloned window to see both windows at the same time.
Position the cursor in the two panes or windows in totally different locations, making sure to not show any segment of the file in both panes.
Make an edit in one of the panes. The other pane will remain positioned where you just placed it. This is good.
Do a CTRL-Z to undo the edit. The other pane will reposition the cursor to show the area of the file where the edit was just undone. This is not good.

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

macOS Ventrua Version 13.5.1

### JDK

Java: 17.0.2; Java HotSpot(TM) 64-Bit Server VM 17.0.2+8-LTS-86

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

This is a repeatable issue. Happens every time.

### Are you willing to submit a pull request?

Yes

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Apache NetBeans 19 using split or cloned editor windows, then trace the editor's undo/redo and cursor-position handling. Done means CTRL-Z and SHIFT-CTRL-Z leave the other pane or window at its independently selected location while the edit is undone or redone.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.