diff --git a/rse/features/org.eclipse.rse.terminals-feature/feature.xml b/rse/features/org.eclipse.rse.terminals-feature/feature.xml index 488cdc8340a..26bbe29dc63 100644 --- a/rse/features/org.eclipse.rse.terminals-feature/feature.xml +++ b/rse/features/org.eclipse.rse.terminals-feature/feature.xml @@ -12,7 +12,7 @@ diff --git a/terminal/org.eclipse.tm.terminal-feature/feature.xml b/terminal/org.eclipse.tm.terminal-feature/feature.xml index 250ef8b189b..ffd096dc042 100644 --- a/terminal/org.eclipse.tm.terminal-feature/feature.xml +++ b/terminal/org.eclipse.tm.terminal-feature/feature.xml @@ -13,7 +13,7 @@ diff --git a/terminal/org.eclipse.tm.terminal.local.sdk-feature/feature.xml b/terminal/org.eclipse.tm.terminal.local.sdk-feature/feature.xml index 729759bd3ab..c1dcb605492 100644 --- a/terminal/org.eclipse.tm.terminal.local.sdk-feature/feature.xml +++ b/terminal/org.eclipse.tm.terminal.local.sdk-feature/feature.xml @@ -13,7 +13,7 @@ diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml b/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml index acec08aa4c4..b33a930b95f 100644 --- a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml +++ b/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml @@ -13,7 +13,7 @@ diff --git a/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF index d73a07422ac..ce562ea393f 100644 --- a/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF +++ b/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.tm.terminal; singleton:=true -Bundle-Version: 3.1.0.qualifier +Bundle-Version: 3.1.1.qualifier Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java index 144582c2723..3941862adc5 100644 --- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java +++ b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2011 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 @@ -7,6 +7,7 @@ * * Contributors: * Michael Scharf (Wind River) - initial API and implementation + * Anton Leherbauer (Wind River) - [206329] Changing terminal size right after connect does not scroll properly *******************************************************************************/ package org.eclipse.tm.internal.terminal.emulator; @@ -77,34 +78,27 @@ public class VT100EmulatorBackend implements IVT100EmulatorBackend { synchronized (fTerminal) { if(lines==fLines && cols==fColumns) return; // nothing to do - // cursor line from the bottom - int cl=lines-(fLines-getCursorLine()); + // relative cursor line + int cl=getCursorLine(); int cc=getCursorColumn(); - int newLines=Math.max(lines,fTerminal.getHeight()); - // if the terminal has no history, then resize by - // setting the size to the new size - if(fTerminal.getHeight()==fLines) { - if(lines1) -// break; -// // is the line empty? -// if(segments[0].getText().replaceAll("[\000 ]+", "").length()==0) -// break; -// } - } else { - cl+=fLines-lines; + int height=fTerminal.getHeight(); + // absolute cursor line + int acl=cl+height-fLines; + int newLines=Math.max(lines,height); + if(lines