diff options
author | 2008-03-04 22:05:52 -0500 | |
---|---|---|
committer | 2008-03-04 22:05:52 -0500 | |
commit | e672ee07c4b97fa205db0a5c75f69d9f8310eaac (patch) | |
tree | 9a026d4edd3c840b49c2b2c79115d143285903f1 /modules | |
parent | 4187ba40e77ee91ae99b6fb6356cced2eb717d7e (diff) |
Fixed bugs with tonumber(cocoa_dialog(...)) in various files.
Instead of the extra overhead when calling tonumber(), add the --no-newline
option and do a direct string comparison.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/editing.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 1a06bae7..d032356d 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -223,9 +223,9 @@ function goto_line(line) title = 'Go To', text = 'Line Number:', ['no-newline'] = true - } ):match('%d+$') - if not line and line > -1 then return end - line = tonumber(line) + } ) + if line == '-1' then return end + line = tonumber( line:match('%d+$') ) end buffer:ensure_visible_enforce_policy(line - 1) buffer:goto_line(line - 1) |