For those people who are using Windows and having the issue where if you pull a tab from a window and drop it on a different monitor and your window gets rendered off screen, I have a solution that will make things feel a bit more normal. (This issue has been reported by a number of people).
I think it is a shame that I have to do this for a stable release version of ST2 (that I have paid for), but alas it appears this issue is getting no love.
Below is a AutoHotkey script that will look for when ST2 windows are created, if their Y coordinates are off the screen, it should move the window vertically under the mouse. This will make ST2 appear to work how it should be working.
[pre=#000000]#Persistent
SetBatchLines, -1
Process, Priority, High
Gui +LastFound
hWnd := WinExist()
DllCall( “RegisterShellHookWindow”, UInt,hWnd )
MsgNum := DllCall( “RegisterWindowMessage”, Str,“SHELLHOOK” )
OnMessage( MsgNum, “ShellMessage” )
Return
ShellMessage( wParam,lParam ) {
If ( wParam = 1 ) ; HSHELL_WINDOWCREATED := 1
{
WinGetTitle, Title, ahk_id %lParam%
If ( RegExMatch(Title, “- Sublime Text 2$” ))
{
WinGetPos, Xpos, Ypos, , , ahk_id %lParam%
if ( Ypos > A_ScreenHeight || Ypos < 0) {
CoordMode, Mouse, Screen
MouseGetPos, Xmouse, Ymouse
WinMove, ahk_id %lParam%, Xpos, Ymouse
}
}
}
}[/pre]
Hope this helps some people. Hopefully this issue will be fixed in the near future and allow us to get rid of such a script. This is why I am not creating a repo for such a script; I am optimistic that this issue will be resolved in ST2 sometime soon.