MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / wordPostion

Method wordPostion

src/plugins/codeeditor/lsp/languageclienthandler.cpp:184–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184int LanguageClientHandlerPrivate::wordPostion()
185{
186 int pos = editor->cursorPosition();
187 if (editor->hasSelectedText()) {
188 int startPos = editor->wordStartPositoin(pos);
189 int endPos = editor->wordEndPosition(pos);
190 return (startPos + endPos) / 2;
191 }
192
193 return pos;
194}
195
196newlsp::Client *LanguageClientHandlerPrivate::getClient()
197{

Callers 2

Calls 3

wordStartPositoinMethod · 0.80
wordEndPositionMethod · 0.80
cursorPositionMethod · 0.45

Tested by

no test coverage detected