| Message |
It is a bit fiddly to do that, because the command window is an edit control, and I don't get notified when you paste into it. However you can run the (Lua) script below (eg. at world open time):
AcceleratorTo ("F8", [[ do
local line = GetCommand ()
line = string.gsub (line, "\r\n", "\n")
line = string.gsub (line, "\r", "\n")
line = string.gsub (line, "\n", "\r\n")
PushCommand ()
SetCommand (line)
end
]], sendto.script)
Then once you have pasted some problem code into the command window, hit F8 and it will be fixed.
What it does is:
- Gets the command window contents
- Converts \r\n (normal DOS line endings) into straight \n
- Converts \r (Mac line endings) into \n
- Converts the resulting \n endings into normal DOS endings: \r\n
- Puts it back into the command window.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|