Created
April 27, 2015 13:25
-
-
Save petrihakkinen/fc9905ec660076f7cde4 to your computer and use it in GitHub Desktop.
Enlarge sublime text 3 autcomplete list width from 300 pixels to 600 pixels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- sublime text 3 autcomplete dialog width is hardcoded to 300 pixels | |
-- this lua script changes it to 600 pixels by modifying the sublime text executable | |
-- backup the original executable before running the patch! | |
local filename = "c:/program files/sublime text 3/sublime_text.exe" | |
local hex = function(t) | |
local s = "" | |
for i=1,#t do | |
s = s..string.char(t[i]) | |
end | |
return s | |
end | |
local what = hex{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x72, 0x40 } | |
local with = hex{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x82, 0x40 } | |
local f = io.open(filename, "rb") | |
local data = f:read("*a") | |
f:close() | |
local i,j = string.find(data, what, 1, true) | |
assert(i and j, "patch failed") | |
data = data:sub(1, i - 1)..with..data:sub(j + 1) | |
local f = io.open(filename, "wb") | |
f:write(data) | |
f:close() | |
print("done") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment