diff options
author | 2014-06-04 22:22:54 -0400 | |
---|---|---|
committer | 2014-06-04 22:22:54 -0400 | |
commit | 5c12a6ae46f93fdb22cd779089bec57f809a2600 (patch) | |
tree | da0ceb142fc6bd757f5fdd4dc53280490da4ca73 | |
parent | cf5190cebe13d9ccb579455c7fcd8f205da3d6bb (diff) | |
download | textadept-5c12a6ae46f93fdb22cd779089bec57f809a2600.tar.gz textadept-5c12a6ae46f93fdb22cd779089bec57f809a2600.zip |
Always focus the message buffer initially; modules/textadept/run.lua
This allows process output to be scrolled into view until the user switches
buffers.
-rw-r--r-- | modules/textadept/run.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index f07ead03..5c83a37d 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -105,8 +105,8 @@ local function command(commands, event) preferred_view = view local events_emit = events.emit - local function emit_output(output) - ui.SILENT_PRINT = not OSX and true + local function emit_output(output, focus) + ui.SILENT_PRINT = not focus and not OSX and true for line in output:gmatch('[^\r\n]+') do events_emit(event, data, line:iconv('UTF-8', _CHARSET)) end @@ -115,7 +115,7 @@ local function command(commands, event) local function emit_status(status) emit_output('> exit status: '..status) end if commands == M.build_commands then emit_output('> cd '..cwd) end - emit_output('> '..command) + emit_output('> '..command, true) local p, err = spawn(command, cwd, emit_output, emit_output, emit_status) if not p then error(err) end |