Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fleet #897

Merged
merged 22 commits into from
Jun 5, 2024
Merged

Fleet #897

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ public VimCommandLineCaret getCaret() {
}

@Override
public void setCurrentActionPromptCharacter(char c) {
public void setPromptCharacter(char c) {
entry.setCurrentActionPromptCharacter(c);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public class KeyHandler {

public fun setPromptCharacterEx(promptCharacter: Char) {
val commandLine = injector.commandLine.getActiveCommandLine() ?: return
commandLine.setCurrentActionPromptCharacter(promptCharacter)
commandLine.setPromptCharacter(promptCharacter)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ package com.maddyhome.idea.vim.api
import javax.swing.KeyStroke

public interface VimCommandLine {
public val caret: VimCommandLineCaret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this change is included in this commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any objective reason for this; I just felt that this field would look better at the top of the class and didn't want to create a separate commit for such a minor change


public val label: String

/**
Expand All @@ -25,11 +27,10 @@ public interface VimCommandLine {
* This is the text that the user sees on the screen.
*/
public val visibleText: String
public val caret: VimCommandLineCaret

public fun setText(string: String)
public fun handleKey(key: KeyStroke)
public fun deactivate(refocusOwningEditor: Boolean, resetCaret: Boolean)

public fun setCurrentActionPromptCharacter(char: Char)
public fun setPromptCharacter(char: Char)
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class DigraphConsumer : KeyConsumer {
DigraphResult.RES_HANDLED -> {
keyProcessResultBuilder.addExecutionStep { lambdaKeyState, _, _ ->
val commandLine = injector.commandLine.getActiveCommandLine()
commandLine?.setCurrentActionPromptCharacter(if (lambdaKeyState.commandBuilder.isPuttingLiteral()) '^' else key.keyChar)
commandLine?.setPromptCharacter(if (lambdaKeyState.commandBuilder.isPuttingLiteral()) '^' else key.keyChar)
lambdaKeyState.commandBuilder.addKey(key)
}
return true
Expand Down