summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2019-05-08 12:50:08 +0200
committerDavid Schulz <david.schulz@qt.io>2019-05-09 10:25:24 +0000
commit970a09519db5557dbf6de443e3b1992c3ea74c9a (patch)
tree57a3b11aade9ca5da1d8cc3458d46be33a459221 /src/plugins/cpptools/cpptoolsplugin.cpp
parent2347f0d1082728c047217972a17f9ceaaecf040c (diff)
downloadqt-creator-970a09519db5557dbf6de443e3b1992c3ea74c9a.tar.gz
LSP: reredo completion replacement logic
replacing the text from word start to current cursor position only works if we are not currently at a word start. For example completing: object.function(var|) will not replace the already typed var, because selecting from cursor position to word start does not select anything. Try selecting from current position backwards as long as the inserted text matches case insensitive to the already available text, or select the match of the "[a-zA-Z_][a-zA-Z0-9_]" regex. Whichever selected text is longer will be replaced. Change-Id: I73965183ba430a8de1b7725e1f7bc7621861433f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
0 files changed, 0 insertions, 0 deletions