diff options
author | 2016-04-16 12:17:47 -0400 | |
---|---|---|
committer | 2016-04-16 12:17:47 -0400 | |
commit | 147dcbd2576ce2d047eb239cb74cdb802e1ddf1e (patch) | |
tree | 9995063851d17d1c94dbdd5229b87a1a5d924ed7 /modules/textadept/run.lua | |
parent | 180b3ebad146e819fecc392e8b322820bc2e15e6 (diff) | |
download | textadept-147dcbd2576ce2d047eb239cb74cdb802e1ddf1e.tar.gz textadept-147dcbd2576ce2d047eb239cb74cdb802e1ddf1e.zip |
`events.CHAR_ADDED` emits a character code, not a byte.
Diffstat (limited to 'modules/textadept/run.lua')
-rw-r--r-- | modules/textadept/run.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 42710813..fec77088 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -264,9 +264,9 @@ events.connect(events.BUILD_OUTPUT, print_output) function M.stop() if M.proc then M.proc:kill() end end -- Send line as input to process stdin on return. -events.connect(events.CHAR_ADDED, function(byte) +events.connect(events.CHAR_ADDED, function(code) local proc = M.proc - if byte == 10 and proc and proc.status and proc:status() == 'running' and + if code == 10 and proc and proc.status and proc:status() == 'running' and buffer._type == _L['[Message Buffer]'] then local line_num = buffer:line_from_position(buffer.current_pos) - 1 proc:write((buffer:get_line(line_num))) |