From 110824b27e4fdd20197e85364b09d2a93aa70aed Mon Sep 17 00:00:00 2001
From: Eike Ziller <eike.ziller@nokia.com>
Date: Tue, 2 Dec 2008 17:35:55 +0100
Subject: [PATCH] Fixes:    - Size of terminal when open in external editor on
 Mac

---
 bin/runInTerminal.command                              | 8 ++++++--
 src/plugins/coreplugin/editormanager/editormanager.cpp | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/bin/runInTerminal.command b/bin/runInTerminal.command
index 89195e3d102..372820c1b11 100755
--- a/bin/runInTerminal.command
+++ b/bin/runInTerminal.command
@@ -1,7 +1,11 @@
 #!/bin/bash
 osascript >/dev/null 2>&1 <<EOF
     tell application "Terminal"
-    activate
-    do script with command "$@; exit"
+        do script "$1 $2 +$3 +\"normal $4|\"; exit"
+        set currentTab to the result
+        set number of columns of currentTab to $5
+        set number of rows of currentTab to $6
+        set position of windows whose tabs contains currentTab to {$7, $8}
+        activate
     end tell
 EOF
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 19bbd6fc631..aa15e462f86 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -345,7 +345,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
 
 #ifdef Q_OS_MAC
     m_d->m_externalEditor = m_d->m_core->resourcePath()
-        +QLatin1String("/runInTerminal.command vi %f +%l");
+        +QLatin1String("/runInTerminal.command vi %f %l %c %W %H %x %y");
 #elif defined(Q_OS_UNIX)
     m_d->m_externalEditor = QLatin1String("xterm -geom %Wx%H+%x+%y -e vi %f +%l +\"normal %c|\"");
 #endif
-- 
GitLab