From dec3c0f563969b44f99ad99c59f9fdb42a567782 Mon Sep 17 00:00:00 2001 From: Uwe Stieber <uwe.stieber@windriver.com> Date: Fri, 20 Feb 2015 09:43:30 +0100 Subject: [PATCH] Terminal: Fix Bug 460334 - Local terminal disconnects if typing german umlaut character --- .../tm/internal/terminal/emulator/VT100Emulator.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/terminal/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java b/terminal/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java index 2d75c086a8c..4f8e1364d5a 100644 --- a/terminal/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java +++ b/terminal/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java @@ -987,19 +987,11 @@ public class VT100Emulator implements ControlListener { String positionReport = "\u001b[" + (relativeCursorLine() + 1) + ";" + //$NON-NLS-1$ //$NON-NLS-2$ (getCursorColumn() + 1) + "R"; //$NON-NLS-1$ - OutputStreamWriter streamWriter = null; try { - streamWriter = new OutputStreamWriter(terminal.getOutputStream(), "ISO-8859-1"); //$NON-NLS-1$ - streamWriter.write(positionReport, 0, positionReport.length()); - streamWriter.flush(); + terminal.getOutputStream().write(positionReport.getBytes("ISO-8859-1")); //$NON-NLS-1$ + terminal.getOutputStream().flush(); } catch (IOException ex) { Logger.log("Caught IOException!"); //$NON-NLS-1$ - } finally { - if (streamWriter != null) { - try { - streamWriter.close(); - } catch (IOException e) { /* ignored on purpose */ } - } } }