diff --git a/content/buffers.js b/content/buffers.js index 958ac412..1d423fde 100644 --- a/content/buffers.js +++ b/content/buffers.js @@ -402,7 +402,7 @@ vimperator.Buffer = function() //{{{ var match; if (match = buffer.match(/^(\d+):?/)) - return vimperator.tabs.select(parseInt(match[1]) - 1, false); // make it zero-based + return vimperator.tabs.select(parseInt(match[1], 10) - 1, false); // make it zero-based var matches = []; var lower_buffer = buffer.toLowerCase(); diff --git a/content/commands.js b/content/commands.js index 462a56d6..a53d858e 100644 --- a/content/commands.js +++ b/content/commands.js @@ -207,7 +207,7 @@ vimperator.Commands = function() //{{{ // parse count if (matches[0]) - matches[0] = parseInt(matches[0]); + matches[0] = parseInt(matches[0], 10); else matches[0] = -1; @@ -1301,7 +1301,7 @@ vimperator.Commands = function() //{{{ } else if (type == "number") { - var num = parseInt(val, 10); + var num = parseInt(val); if (isNaN(num)) vimperator.echoerr("E521: Number required after =: " + option.name + "=" + val); else @@ -1483,7 +1483,7 @@ vimperator.Commands = function() //{{{ } else if (/^\d+$/.test(args)) { - var index = parseInt(args) - 1; + var index = parseInt(args, 10) - 1; if (index < vimperator.tabs.count()) vimperator.tabs.select(index, true); else diff --git a/content/tabs.js b/content/tabs.js index f2a85ead..8016fb8a 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -67,9 +67,9 @@ vimperator.Tabs = function() //{{{ else { if (spec.match(/^([+-]\d+)$/)) // relative position +/-N - position += parseInt(spec); + position += parseInt(spec, 10); else // absolute position - position = parseInt(spec); + position = parseInt(spec, 10); } if (position > last) diff --git a/content/ui.js b/content/ui.js index a7ff62d0..c7f4414b 100644 --- a/content/ui.js +++ b/content/ui.js @@ -708,7 +708,7 @@ vimperator.CommandLine = function() //{{{ case "": if (event.originalTarget.className == "hl-URL buffer-list") { - vimperator.tabs.select(parseInt(event.originalTarget.parentNode.parentNode.firstChild.textContent) - 1); + vimperator.tabs.select(parseInt(event.originalTarget.parentNode.parentNode.firstChild.textContent, 10) - 1); close_window = true; break; } diff --git a/content/vimperator.js b/content/vimperator.js index 27f94a28..25e86a95 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -311,7 +311,7 @@ const vimperator = (function() //{{{ // Number else if (match = string.match(/^(\d+)$/)) { - return parseInt(match[1]); + return parseInt(match[1], 10); } var reference = this.variableReference(string);