1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-08-10 15:40:37 +02:00

Use '\n' separator for CmdHandler

This commit is contained in:
Alex Plate 2019-05-08 19:32:09 +03:00
parent f5dd1722f5
commit f80111299f
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
4 changed files with 5 additions and 8 deletions
src/com/maddyhome/idea/vim/ex/handler
test/org/jetbrains/plugins/ideavim/ex/handler

View File

@ -60,7 +60,7 @@ class CmdHandler : CommandHandler(
}
private fun listAlias(editor: Editor, filter: String): Boolean {
val lineSeparator = System.lineSeparator()
val lineSeparator = "\n"
val allAliases = VimPlugin.getCommand().listAliases()
val aliases = allAliases.filter {
(filter.isEmpty() || it.key.startsWith(filter))

View File

@ -29,8 +29,7 @@ class CmdClearHandlerTest : VimFileEditorTestCase() {
configureByText("\n")
typeText(commandToKeys("command"))
assertPluginError(false)
val lineSeparator = System.lineSeparator()
assertExOutput("Name Args Definition$lineSeparator") // There should not be any aliases.
assertExOutput("Name Args Definition\n") // There should not be any aliases.
typeText(commandToKeys("command Vs vs"))
assertPluginError(false)
@ -52,6 +51,6 @@ class CmdClearHandlerTest : VimFileEditorTestCase() {
assertPluginError(false)
typeText(commandToKeys("command"))
assertPluginError(false)
assertExOutput("Name Args Definition$lineSeparator") // There should not be any aliases.
assertExOutput("Name Args Definition\n") // There should not be any aliases.
}
}

View File

@ -42,8 +42,7 @@ class CmdHandlerTest : VimFileEditorTestCase() {
configureByText("\n")
typeText(VimTestCase.commandToKeys("command"))
assertPluginError(false)
val lineSeparator = System.lineSeparator()
assertExOutput("Name Args Definition$lineSeparator") // There should not be any aliases.
assertExOutput("Name Args Definition\n") // There should not be any aliases.
typeText(VimTestCase.commandToKeys("command Vs vs"))
assertPluginError(false)

View File

@ -30,8 +30,7 @@ class DelCmdHandlerTest : VimFileEditorTestCase() {
configureByText("\n")
typeText(VimTestCase.commandToKeys("command"))
assertPluginError(false)
val lineSeparator = System.lineSeparator()
assertExOutput("Name Args Definition$lineSeparator") // There should not be any aliases.
assertExOutput("Name Args Definition") // There should not be any aliases.
typeText(VimTestCase.commandToKeys("command Vs vs"))
assertPluginError(false)