From 5c12a6ae46f93fdb22cd779089bec57f809a2600 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 4 Jun 2014 22:22:54 -0400 Subject: Always focus the message buffer initially; modules/textadept/run.lua This allows process output to be scrolled into view until the user switches buffers. --- modules/textadept/run.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') 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 -- cgit v1.2.3