Skip to content

Commit b2a0f16

Browse files
kamilkosekCopilot
andauthored
Update Jellyfin.Plugin.Streamyfin/Pages/YamlEditor/index.js
Co-authored-by: Copilot <[email protected]>
1 parent cf595bf commit b2a0f16

File tree

1 file changed

+2
-2
lines changed
  • Jellyfin.Plugin.Streamyfin/Pages/YamlEditor

1 file changed

+2
-2
lines changed

Jellyfin.Plugin.Streamyfin/Pages/YamlEditor/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ export default function (view, params) {
109109
if (idx === -1) return word.startColumn;
110110
let start = idx + 1; // first char after colon
111111
// skip spaces
112-
while (beforeCursor.charAt(start) === ' ') start++;
112+
while (start < beforeCursor.length && beforeCursor.charAt(start) === ' ') start++;
113113
// skip optional opening quotes
114-
while (beforeCursor.charAt(start) === '"' || beforeCursor.charAt(start) === "'") start++;
114+
while (start < beforeCursor.length && (beforeCursor.charAt(start) === '"' || beforeCursor.charAt(start) === "'")) start++;
115115
// Monaco columns are 1-based
116116
return start + 1;
117117
})();

0 commit comments

Comments
 (0)