Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 177019 Details for
Bug 323166
Backport [terminal] "Copy" is disabled when an entire line is selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to backport
trmCopyBackport.diff.txt (text/plain), 4.94 KB, created by
Martin Oberhuber
on 2010-08-19 11:55:39 EDT
(
hide
)
Description:
Patch to backport
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2010-08-19 11:55:39 EDT
Size:
4.94 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tm.terminal >Index: src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java,v >retrieving revision 1.14.2.3 >diff -u -r1.14.2.3 TextCanvas.java >--- src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java 3 Jun 2010 08:39:03 -0000 1.14.2.3 >+++ src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java 19 Aug 2010 15:46:34 -0000 >@@ -12,6 +12,7 @@ > * Martin Oberhuber (Wind River) - [294327] After logging in, the remote prompt is hidden > * Anton Leherbauer (Wind River) - [294468] Fix scroller and text line rendering > * Uwe Stieber (Wind River) - [205486] Fix ScrollLock always moving to line 1 >+ * Anton Leherbauer (Wind River) - [219589] Copy an entire line selection > *******************************************************************************/ > package org.eclipse.tm.internal.terminal.textcanvas; > >@@ -92,12 +93,8 @@ > public void terminalDataChanged() { > if(isDisposed()) > return; >+ // scroll to end (unless scroll lock is active) > scrollToEnd(); >- // make sure the scroll area is correct: >- if (!fScrollLock) { >- scrollY(getVerticalBar()); >- scrollX(getHorizontalBar()); >- } > } > }); > // let the cursor blink if the text canvas gets the focus... >@@ -167,7 +164,10 @@ > if (fDraggingStart !=null && !p.equals(fDraggingEnd)) { > fDraggingEnd = p; > if (compare(p, fDraggingStart) < 0) { >- fCellCanvasModel.setSelection(p.y, fDraggingStart.y, p.x, fDraggingStart.x); >+ // bug 219589 - make sure selection start coordinates are non-negative >+ int startColumn = Math.max(0, p.x); >+ int startRow = Math.max(p.y, 0); >+ fCellCanvasModel.setSelection(startRow, fDraggingStart.y, startColumn, fDraggingStart.x); > } else { > fCellCanvasModel.setSelection(fDraggingStart.y, p.y, fDraggingStart.x, p.x); > >@@ -250,14 +250,8 @@ > setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight()); > setRedraw(false); > try { >- // scroll to end >+ // scroll to end (unless scroll lock is active) > scrollToEnd(); >- // make sure the scroll area is correct: >- if (!fScrollLock) { >- scrollY(getVerticalBar()); >- scrollX(getHorizontalBar()); >- } >- > getParent().layout(); > } finally { > setRedraw(true); >@@ -273,6 +267,9 @@ > if(v.y!=-y) { > setVirtualOrigin(v.x,y); > } >+ // make sure the scroll area is correct: >+ scrollY(getVerticalBar()); >+ scrollX(getHorizontalBar()); > } > } > /** >Index: src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java,v >retrieving revision 1.13 >diff -u -r1.13 AbstractTextCanvasModel.java >--- src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java 11 Apr 2008 17:37:13 -0000 1.13 >+++ src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java 19 Aug 2010 15:46:34 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others. >+ * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -8,6 +8,7 @@ > * Contributors: > * Michael Scharf (Wind River) - initial API and implementation > * Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1 >+ * Anton Leherbauer (Wind River) - [219589] Copy an entire line selection > *******************************************************************************/ > package org.eclipse.tm.internal.terminal.textcanvas; > >@@ -281,7 +282,7 @@ > * @return the currently selected text > */ > private String extractSelectedText() { >- if(fSelectionStartLine<0 || fSelectionStartCoumn<0 || fSelectionEndColumn<0 || fSelectionSnapshot==null) >+ if(fSelectionStartLine<0 || fSelectionStartCoumn<0 || fSelectionSnapshot==null) > return ""; //$NON-NLS-1$ > StringBuffer buffer=new StringBuffer(); > for (int line = fSelectionStartLine; line <= fSeletionEndLine; line++) { >@@ -289,7 +290,7 @@ > char[] chars=fSelectionSnapshot.getChars(line); > if(chars!=null) { > text=new String(chars); >- if(line==fSeletionEndLine) >+ if(line==fSeletionEndLine && fSelectionEndColumn >= 0) > text=text.substring(0, Math.min(fSelectionEndColumn+1,text.length())); > if(line==fSelectionStartLine) > text=text.substring(Math.min(fSelectionStartCoumn,text.length()));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 323166
: 177019