Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 76740 - [painting] Ctrl+End brings StyledText into strange state
Summary: [painting] Ctrl+End brings StyledText into strange state
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 35886 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-21 08:48 EDT by Gábor Balogh CLA
Modified: 2006-04-12 13:21 EDT (History)
2 users (show)

See Also:


Attachments
Result of Bug (100.51 KB, image/jpeg)
2004-11-02 10:32 EST, Gábor Balogh CLA
no flags Details
Test text file to get this bug (1.34 KB, text/plain)
2004-11-02 13:00 EST, Gábor Balogh CLA
no flags Details
Shows widget in strange state (3.87 KB, image/png)
2006-04-10 04:47 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gábor Balogh CLA 2004-10-21 08:48:29 EDT
In Text Editor or Java Editor typing CTRL+PAGEUP and CTRL+PAGEDOWN creates left 
margin if last line is longer than visible editor width and text is longer 
(vertically) than visible editor area.

Workaround: Positioning on last character in last line and typing any key but 
ARROW UP removes this extra margin.

It is reproducable always.
Comment 1 Dani Megert CLA 2004-10-21 09:02:31 EDT
I cannot reproduce using I200410190941.
Please attach some pictures and also see:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-text-home/development/bug-incomplete.htm
Comment 2 Gábor Balogh CLA 2004-11-02 10:32:55 EST
Created attachment 15561 [details]
Result of Bug
Comment 3 Gábor Balogh CLA 2004-11-02 10:35:39 EST
Build id: 200409161125

Please type CTRL+PAGEUP and CTRL+PAGEDOWN in the last line (at any cursor 
position).

Screenshot about result (text editor was used) attached.
Comment 4 Dani Megert CLA 2004-11-02 10:41:37 EST
Can you attach the file.
Did you install other plug-ins?
Comment 5 Dani Megert CLA 2004-11-02 10:47:15 EST
Could not reproduce under Linux either
Comment 6 Gábor Balogh CLA 2004-11-02 13:00:38 EST
Created attachment 15569 [details]
Test text file to get this bug

No extra plug-ins are used.
Comment 7 Dani Megert CLA 2004-11-02 13:17:39 EST
Cannot reproduce using I200411010800
Note: to me it looks as if the file doesn't correspond to the picture attached
in comment 2.
Comment 8 Gábor Balogh CLA 2004-11-03 05:44:17 EST
Content of test file is different than the one used at taking screenshot but 
the outcome is the same. Also in build: 200411022000

The big problem (my fault, sorry) was the key combination I wrote. So instead 
of CTRL+PAGEUP and CTRL+PAGEDOWN:

Type CTRL+HOME and CTRL+END in the last line of test text file.
Comment 9 Dani Megert CLA 2004-11-03 06:27:01 EST
Can reproduce now. Simple steps:

1. open the attached file
2. press Ctrl+End
3. press Arrow Up
==> cheese

might be related to bug 35886
Comment 10 Dani Megert CLA 2005-05-30 04:22:59 EDT
Deferred.
Comment 11 Dani Megert CLA 2006-04-10 04:39:25 EDT
*** Bug 35886 has been marked as a duplicate of this bug. ***
Comment 12 Dani Megert CLA 2006-04-10 04:46:21 EDT
It's not just the highlighting: the widget is in a strange state where I can't put the caret on column 0.

Dragging the horizontal scroll bar brings the widget back into a good state.
Comment 13 Dani Megert CLA 2006-04-10 04:47:59 EDT
Created attachment 38127 [details]
Shows widget in strange state
Comment 14 Felipe Heidrich CLA 2006-04-11 12:25:06 EDT
Test case:
public static void main(String[] args) {
	Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());
    StringBuffer buffer = new StringBuffer();
    for (int i = 0; i < 50; i++) buffer.append("TestTest\n");		
    for (int i = 0; i < 50; i++) buffer.append("TestTest");    
    StyledText text = new StyledText(shell, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
    text.setText(buffer.toString());
    shell.setSize(400, 400);
    shell.open();
    text.invokeAction(ST.TEXT_END);
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }
    display.dispose();
}
Comment 15 Felipe Heidrich CLA 2006-04-11 13:00:39 EDT
fixed in head > 20060411