1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-09 09:34:06 +02:00

Fix some qodana issues

This commit is contained in:
Alex Plate 2023-03-03 18:36:50 +02:00
parent b413c8e715
commit bed078213b
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
2 changed files with 14928 additions and 16898 deletions
qodana.sarif.json
src/main/java/com/maddyhome/idea/vim/group

File diff suppressed because it is too large Load Diff

View File

@ -104,39 +104,7 @@ class MotionGroup : VimMotionGroupBase() {
return SearchHelper.findMatchingPairOnCurrentLine(editor.ij, caret.ij).toMotionOrError()
}
/**
* This moves the caret to the start of the next/previous camel word.
*
* @param editor The editor to move in
* @param caret The caret to be moved
* @param count The number of words to skip
* @return position
*/
fun moveCaretToNextCamel(editor: Editor, caret: Caret, count: Int): Int {
return if (caret.offset == 0 && count < 0 || caret.offset >= editor.fileSize - 1 && count > 0) {
-1
} else {
SearchHelper.findNextCamelStart(editor, caret, count)
}
}
/**
* This moves the caret to the start of the next/previous camel word.
*
* @param editor The editor to move in
* @param caret The caret to be moved
* @param count The number of words to skip
* @return position
*/
fun moveCaretToNextCamelEnd(editor: Editor, caret: Caret, count: Int): Int {
return if (caret.offset == 0 && count < 0 || caret.offset >= editor.fileSize - 1 && count > 0) {
-1
} else {
SearchHelper.findNextCamelEnd(editor, caret, count)
}
}
override fun moveCaretToFirstDisplayLine(
override fun moveCaretToFirstDisplayLine(
editor: VimEditor,
caret: ImmutableVimCaret,
count: Int,