karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [1/4] karaf git commit: [KARAF-5059] The terminal size is not set correctly when connecting through SSH
Date Fri, 24 Mar 2017 07:46:17 GMT
Repository: karaf
Updated Branches:
  refs/heads/master dc80e9c29 -> 0f11422f9


[KARAF-5059] The terminal size is not set correctly when connecting through SSH

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/0f11422f
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/0f11422f
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/0f11422f

Branch: refs/heads/master
Commit: 0f11422f922a6290dc2a8114d86951c5d702dea0
Parents: 881e13f
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Fri Mar 24 08:23:33 2017 +0100
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Fri Mar 24 08:46:01 2017 +0100

----------------------------------------------------------------------
 .../ssh/src/main/java/org/apache/karaf/shell/ssh/SshTerminal.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/0f11422f/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshTerminal.java
----------------------------------------------------------------------
diff --git a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshTerminal.java b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshTerminal.java
index ebd9e22..6731243 100644
--- a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshTerminal.java
+++ b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/SshTerminal.java
@@ -129,6 +129,9 @@ public class SshTerminal extends ExternalTerminal implements Terminal
{
                     break;
             }
         }
+        int w = Integer.valueOf(this.environment.getEnv().get(Environment.ENV_COLUMNS));
+        int h = Integer.valueOf(this.environment.getEnv().get(Environment.ENV_LINES));
+        setSize(new Size(w, h));
     }
 
     protected void handleSignal(org.apache.sshd.server.Signal signal) {


Mime
View raw message