Skip to content

Commit a0a4e37

Browse files
committed
chore: html class code hint previews selection ux
1 parent abb5057 commit a0a4e37

File tree

1 file changed

+5
-0
lines changed
  • src/extensions/default/HTMLCodeHints

1 file changed

+5
-0
lines changed

src/extensions/default/HTMLCodeHints/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,11 @@ define(function (require, exports, module) {
664664
if(isLiveHighlight) {
665665
// this is via user press up and down arrows when code hints is visible
666666
if(!this.editor.hasSelection()){
667+
const initialOffset = this.tagInfo.position.offset;
668+
textAfterCursor = this.tagInfo.attr.value.substr(initialOffset);
669+
let firstSegment = textAfterCursor.split(" ");
670+
firstSegment = firstSegment[0]; // "name"
671+
end.ch = end.ch + firstSegment.length;
667672
this.editor.setSelection(start, end);
668673
}
669674
this.editor.replaceSelection(completion, 'around', "liveHints");

0 commit comments

Comments
 (0)