aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-07-05 15:47:51 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2008-07-05 15:47:51 -0400
commit6934ce3ba982fa3dc85ee005a6a49f6213a2c555 (patch)
treeb801319e5321d71318eb1981199d0202d19723e2 /modules
parentc6b75e9e62576817af4a3115611f028a1e6aaa1f (diff)
downloadtextadept-6934ce3ba982fa3dc85ee005a6a49f6213a2c555.tar.gz
textadept-6934ce3ba982fa3dc85ee005a6a49f6213a2c555.zip
Cancelling 'goto line' dialog shouldn't error; modules/textadept/editing.lua
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/editing.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index d032356d..3609aa34 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -224,8 +224,8 @@ function goto_line(line)
text = 'Line Number:',
['no-newline'] = true
} )
- if line == '-1' then return end
line = tonumber( line:match('%d+$') )
+ if not line or line < 0 then return end
end
buffer:ensure_visible_enforce_policy(line - 1)
buffer:goto_line(line - 1)