mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-28 01:00:28 +03:00
tweak prompt text
This commit is contained in:
parent
be9bfa479f
commit
624c112d08
@ -52,7 +52,7 @@ ColorRegistry::ColorRegistry()
|
|||||||
{ "Error", { Color::Black, Color::Red } },
|
{ "Error", { Color::Black, Color::Red } },
|
||||||
{ "StatusLine", { Color::Cyan, Color::Default } },
|
{ "StatusLine", { Color::Cyan, Color::Default } },
|
||||||
{ "StatusCursor", { Color::Black, Color::Cyan } },
|
{ "StatusCursor", { Color::Black, Color::Cyan } },
|
||||||
{ "Prompt", { Color::Cyan, Color::Blue} },
|
{ "Prompt", { Color::Yellow, Color::Default} },
|
||||||
}
|
}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
12
src/main.cc
12
src/main.cc
@ -145,7 +145,7 @@ void do_swap_case(Context& context)
|
|||||||
void do_command(Context& context)
|
void do_command(Context& context)
|
||||||
{
|
{
|
||||||
context.input_handler().prompt(
|
context.input_handler().prompt(
|
||||||
":", get_color("StatusLine"),
|
":", get_color("Prompt"),
|
||||||
std::bind(&CommandManager::complete, &CommandManager::instance(), _1, _2, _3),
|
std::bind(&CommandManager::complete, &CommandManager::instance(), _1, _2, _3),
|
||||||
[](const String& cmdline, PromptEvent event, Context& context) {
|
[](const String& cmdline, PromptEvent event, Context& context) {
|
||||||
if (event == PromptEvent::Validate)
|
if (event == PromptEvent::Validate)
|
||||||
@ -155,7 +155,7 @@ void do_command(Context& context)
|
|||||||
|
|
||||||
void do_pipe(Context& context)
|
void do_pipe(Context& context)
|
||||||
{
|
{
|
||||||
context.input_handler().prompt("pipe: ", get_color("Prompt"), complete_nothing,
|
context.input_handler().prompt("pipe:", get_color("Prompt"), complete_nothing,
|
||||||
[](const String& cmdline, PromptEvent event, Context& context)
|
[](const String& cmdline, PromptEvent event, Context& context)
|
||||||
{
|
{
|
||||||
if (event != PromptEvent::Validate)
|
if (event != PromptEvent::Validate)
|
||||||
@ -174,7 +174,7 @@ void do_pipe(Context& context)
|
|||||||
template<SelectMode mode, bool forward>
|
template<SelectMode mode, bool forward>
|
||||||
void do_search(Context& context)
|
void do_search(Context& context)
|
||||||
{
|
{
|
||||||
const char* prompt = forward ? "search: " : "reverse search: ";
|
const char* prompt = forward ? "search:" : "reverse search:";
|
||||||
SelectionList selections = context.editor().selections();
|
SelectionList selections = context.editor().selections();
|
||||||
context.input_handler().prompt(prompt, get_color("Prompt"), complete_nothing,
|
context.input_handler().prompt(prompt, get_color("Prompt"), complete_nothing,
|
||||||
[selections](const String& str, PromptEvent event, Context& context) {
|
[selections](const String& str, PromptEvent event, Context& context) {
|
||||||
@ -354,7 +354,7 @@ void regex_prompt(Context& context, const String prompt, T on_validate)
|
|||||||
|
|
||||||
void do_select_regex(Context& context)
|
void do_select_regex(Context& context)
|
||||||
{
|
{
|
||||||
regex_prompt(context, "select: ", [](Regex ex, Context& context) {
|
regex_prompt(context, "select:", [](Regex ex, Context& context) {
|
||||||
if (ex.empty())
|
if (ex.empty())
|
||||||
ex = Regex{RegisterManager::instance()['/'].values(context)[0]};
|
ex = Regex{RegisterManager::instance()['/'].values(context)[0]};
|
||||||
else
|
else
|
||||||
@ -366,7 +366,7 @@ void do_select_regex(Context& context)
|
|||||||
|
|
||||||
void do_split_regex(Context& context)
|
void do_split_regex(Context& context)
|
||||||
{
|
{
|
||||||
regex_prompt(context, "split: ", [](Regex ex, Context& context) {
|
regex_prompt(context, "split:", [](Regex ex, Context& context) {
|
||||||
if (ex.empty())
|
if (ex.empty())
|
||||||
ex = Regex{RegisterManager::instance()['/'].values(context)[0]};
|
ex = Regex{RegisterManager::instance()['/'].values(context)[0]};
|
||||||
else
|
else
|
||||||
@ -405,7 +405,7 @@ void do_join(Context& context)
|
|||||||
template<bool matching>
|
template<bool matching>
|
||||||
void do_keep(Context& context)
|
void do_keep(Context& context)
|
||||||
{
|
{
|
||||||
constexpr const char* prompt = matching ? "keep matching: " : "keep not matching: ";
|
constexpr const char* prompt = matching ? "keep matching:" : "keep not matching:";
|
||||||
regex_prompt(context, prompt, [](const Regex& ex, Context& context) {
|
regex_prompt(context, prompt, [](const Regex& ex, Context& context) {
|
||||||
Editor& editor = context.editor();
|
Editor& editor = context.editor();
|
||||||
SelectionList sels = editor.selections();
|
SelectionList sels = editor.selections();
|
||||||
|
Loading…
Reference in New Issue
Block a user