On 6/28/07, markus espenhain <[EMAIL PROTECTED]> wrote:
is this an known bug or maybe can i fix it myself (touched a lua script
yesterday for the first time :]

Hi Markus,

Well it was a new bug for me! Curiously enough, this doesn't happen on
Windows. The fix is to be more careful about return values from Lua
event handlers. Replace your on_line_char() function (about line 300
in extman.lua) with this:

local function on_line_char(ch,was_output)
   if ch == '\n' then
       local in_editor = editor.Focus
       if in_editor and not was_output then
           DispatchOne(_LineEd,grab_line_from(editor))
           return false -- DO NOT interfere with any editor processing!
       elseif not in_editor and was_output then
           DispatchOne(_LineOut,grab_line_from(output))
           return true -- prevent SciTE from trying to evaluate the line
       end
   end
   return false
end

Mostly, this should return false - returning true if handling an
editor char is bad because SciTE will then assume it's handled and not
do the clever indentation stuff.  We do have to return true if we've
caught an output char, because otherwise SciTE thinks it is be
processed in the usual way (that is, as a shell command).

steve d.
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to