mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[full-line] IJ-MR-108108 Fix captureNearestNonEmptyLineInfo
GitOrigin-RevId: 46a6adfaf85189f432547f82c3e1b02c67ddbd0c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dbb9f3f3c6
commit
62aeebc1c9
@@ -96,7 +96,7 @@ class CommonLocationFeatures : ContextFeatureProvider {
|
||||
val startLineNumber = position.line
|
||||
var lineNumber = startLineNumber + delta
|
||||
var text: String? = null
|
||||
while (lineNumber >= 0 && document.getLineText(lineNumber).also { text = it }.isBlank()) lineNumber += delta
|
||||
while (lineNumber >= 0 && lineNumber < document.lineCount && document.getLineText(lineNumber).also { text = it }.isBlank()) lineNumber += delta
|
||||
this["${name}_empty_lines_count"] = MLFeatureValue.float(abs(lineNumber - startLineNumber) - 1)
|
||||
text?.let { this["${name}_non_empty_line_length"] = MLFeatureValue.float(it.length) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user