Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix for parameter hints not showing when using tabs instead of spaces #15018

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/JSUtils/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,22 @@ define(function (require, exports, module) {
var col = lexical.info === "call" ? lexical.column : lexical.prev.column,
line,
e,
found;
found,
charPos;

for (line = this.getCursor().line, e = Math.max(0, line - 9), found = false; line >= e; --line) {
if (this.getLine(line).charAt(col) === "(") {
// Column is based on a line with spaces.
// We have to convert it to a character position when tabs are used, otherwise our check will fail.
charPos = this.editor.getCharIndexForColumn(line, col);
if (this.getLine(line).charAt(charPos) === "(") {
found = true;
break;
}
}

if (found) {
inFunctionCall = true;
functionCallPos = {line: line, ch: col};
functionCallPos = {line: line, ch: charPos};
}
}
}
Expand Down