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

Incsrch: add ^g/^#g as a duplicate of ^Enter/^#Enter #2335

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 21 additions & 21 deletions incsrch/ENG/incsrche.hlf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

@Contents
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Contents
This plugin adds the #Incremental Search# capability to the internal FAR editor.

Expand All @@ -20,8 +20,8 @@ $^#Contents

@Menu
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Plugin menu#
After choosing the plugin from editor plugins menu You will see the submenu like this:

Expand Down Expand Up @@ -49,8 +49,8 @@ $^#Plugin menu#

@Cfg
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Plugin configuration#
There are two ways to configure plugin: from #Plugins configuration menu# (Main Menu|Options|Plugins Configuration|Incremental Search) or directly from ~Incremental Search plugin menu~@Menu@ from inside editor.

Expand Down Expand Up @@ -84,8 +84,8 @@ $^#Plugin configuration#

@Iface
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Interface and Keyboard reference#
When in incremental search mode the leftmost characters of the top line will display the prompt #^:#. Start typing the search string and it will be displayed after this prompt.

Expand All @@ -96,25 +96,25 @@ $^#Interface and Keyboard reference#
^#Key bindings#
@+

#Any printable character# appended to the search pattern
#Backspace# delete last pattern character
#Escape# ends incremental search
#Ctrl-V, Shift-Ins# paste search data from clipboard
#Ctrl-Enter# find next in forward search mode
find previous in backward search mode
#Ctrl-Shift-Enter# find previous in forward search mode
find next in backward search mode
#F1# about window and help
#Alt# clear messages area
#Any control character,# ends incremental search and bypass to FAR
#Any printable character# appended to the search pattern
#Backspace# delete last pattern character
#Escape# ends incremental search
#Ctrl-V, Shift-Ins# paste search data from clipboard
#Ctrl-Enter, Ctrl-G# find next in forward search mode
find previous in backward search mode
#Ctrl-Shift-Enter, Ctrl-Shift-G# find previous in forward search mode
find next in backward search mode
#F1# about window and help
#Alt# clear messages area
#Any control character,# ends incremental search and bypass to FAR
#mouse click#

~Contents~@Contents@

@Contact
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Contact information#

Stanislav V. Mekhanoshin, St.Petersburg, Russia
Expand Down
6 changes: 5 additions & 1 deletion incsrch/ENG/whatsnew.eng
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
Версия 2.1
Version 2.2
+ Added ^G, ^#G hotkeys in addition to ^Enter and ^#Enter for search
next/previous.

Version 2.1
+ far2l (FAR for Linux) support

Version 1.21
Expand Down
42 changes: 21 additions & 21 deletions incsrch/UTF8/incsrchr.hlf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

@Contents
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Содержание
Данный плагин добавляет возможность #быстрого поиска# (#incremental search#) во встроенном редакторе FAR.

Expand All @@ -20,8 +20,8 @@ $^#Содержание

@Menu
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Меню плагина#
После того как Вы выбрали плагин из меню плагинов редактора, перед вами появится подменю следующего вида:

Expand Down Expand Up @@ -49,8 +49,8 @@ $^#Меню плагина#

@Cfg
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Настройка плагина#
Существует два способа настройки плагина: из #меню настройки плагинов# (Основное меню|параметры|параметры внешних модулей|быстрый поиск), либо непосредственно из ~Меню плагина~@Menu@, вызванного в редакторе.

Expand Down Expand Up @@ -84,8 +84,8 @@ $^#Настройка плагина#

@Iface
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Интерфейс и клавиатурные команды#
При входе в режим поиска левая часть верхней строки будет содержать подсказку #^:#. Начните набор искомой строки, и она появится после данной подсказки.

Expand All @@ -97,25 +97,25 @@ $^#Интерфейс и клавиатурные команды#
^#Соответствия клавиш#
@+

#Любой печатный символ# добавляется к строке поиска
#Backspace# удаляет последний символ поиска
#Escape# заканчивает поиск
#Ctrl-V, Shift-Ins# вставить строку поиска из буфера обмена
#Ctrl-Enter# найти следующее совпадение при поиске вперед
найти предыдущее совпадение при поиске назад
#Ctrl-Shift-Enter# найти предыдущее совпадение при поиске вперед
найти следующее совпадение при поиске назад
#F1# "О программе" и помощь
#Alt# очистить область сообщений
#Любой управляющий# завершает поиск и передается в FAR
#Любой печатный символ# добавляется к строке поиска
#Backspace# удаляет последний символ поиска
#Escape# заканчивает поиск
#Ctrl-V, Shift-Ins# вставить строку поиска из буфера обмена
#Ctrl-Enter, Ctrl-G# найти следующее совпадение при поиске вперед
найти предыдущее совпадение при поиске назад
#Ctrl-Shift-Enter, Ctrl-Shift-G# найти предыдущее совпадение при поиске вперед
найти следующее совпадение при поиске назад
#F1# "О программе" и помощь
#Alt# очистить область сообщений
#Любой управляющий# завершает поиск и передается в FAR
#символ, кнопка мыши#
──────────
~Содержание~@Contents@

@Contact
$^#Incremental Search FAR plugin#
$^#Version 2.1#
$^#Copyright (C) 1999-2019 Stanislav V. Mekhanoshin#
$^#Version 2.2#
$^#Copyright (C) 1999-2024 Stanislav V. Mekhanoshin#
$^#Об авторе#

Станислав Механошин, Ст.Петербург, Россия
Expand Down
4 changes: 4 additions & 0 deletions incsrch/UTF8/whatsnew.rus
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Версия 2.2
+ Добавлены ^G и ^#G как дублирующие клавиши для ^Enter и ^#Enter для
поиска следующего/предыдущего сравнения.

Версия 2.1
+ Поддержка far2l, FAR для Linux

Expand Down
2 changes: 1 addition & 1 deletion incsrch/clip.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
6 changes: 5 additions & 1 deletion incsrch/control.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -80,13 +80,16 @@ BOOL CollectEvents(void)
PutEvent(KC_BACK);
continue;
case VK_RETURN:
case 'G':
Copy link
Contributor Author

Choose a reason for hiding this comment

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

That said: this is the only functional change.

if (Event.Event.KeyEvent.dwControlKeyState
& (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) {
PutEvent((Event.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED)
? KC_PREV
: KC_NEXT);
continue;
}
if (Event.Event.KeyEvent.wVirtualKeyCode == 'G')
goto Char;
goto Quit;
case VK_INSERT:
if (Event.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED) {
Expand All @@ -101,6 +104,7 @@ BOOL CollectEvents(void)
& (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))
goto Paste;
default:
Char:
if ((Event.Event.KeyEvent.dwControlKeyState
& (ENHANCED_KEY | LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED
| RIGHT_ALT_PRESSED | RIGHT_CTRL_PRESSED))
Expand Down
2 changes: 1 addition & 1 deletion incsrch/incsrch.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion incsrch/incsrch.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
14 changes: 14 additions & 0 deletions incsrch/key_macros.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,17 @@ DisableOutput=0x1
NoInsidePlugin=0x1
NoSendKeysToPlugins=0x1
Sequence=F11 I Home Down Down Down Enter

# Search selected next
[KeyMacros/Editor/CtrlG]
DisableOutput=0x1
NoInsidePlugin=0x1
NoSendKeysToPlugins=0x1
Sequence=F11 I Home Down Down Enter

# Search selected previous
[KeyMacros/Editor/CtrlShiftG]
DisableOutput=0x1
NoInsidePlugin=0x1
NoSendKeysToPlugins=0x1
Sequence=F11 I Home Down Down Down Enter
2 changes: 1 addition & 1 deletion incsrch/loc.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion incsrch/loc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion incsrch/minwin.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion incsrch/misc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
6 changes: 3 additions & 3 deletions incsrch/search.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -88,9 +88,9 @@ static void Help(void)
{
static const DialogTemplateItem DialogTemplate[11] = {
{DI_TEXT, 2, 2, FALSE, DIF_CENTERGROUP, (INT_PTR) _T("FAR Incremental Search plugin")},
{DI_TEXT, 2, 3, FALSE, DIF_CENTERGROUP, (INT_PTR) _T("Version 2.1")},
{DI_TEXT, 2, 3, FALSE, DIF_CENTERGROUP, (INT_PTR) _T("Version 2.2")},
{DI_TEXT, 2, 4, FALSE, DIF_CENTERGROUP | DIF_BOXCOLOR | DIF_SEPARATOR, 0},
{DI_TEXT, 2, 5, FALSE, DIF_CENTERGROUP, (INT_PTR) _T("copyright (c) 1999-2019, Stanislav V. Mekhanoshin")},
{DI_TEXT, 2, 5, FALSE, DIF_CENTERGROUP, (INT_PTR) _T("copyright (c) 1999-2024, Stanislav V. Mekhanoshin")},
{DI_TEXT, 2, 6, FALSE, DIF_CENTERGROUP, (INT_PTR) _T("This program comes with ABSOLUTELY NO WARRANTY")},
{DI_TEXT, 2, 7, FALSE, DIF_CENTERGROUP, (INT_PTR) _T("This is free software, and you are welcome to redistribute it")},
{DI_TEXT, 2, 8, FALSE, DIF_CENTERGROUP, (INT_PTR) _T("under certain conditions.")},
Expand Down
2 changes: 1 addition & 1 deletion incsrch/srchlng.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion incsrch/util.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
FAR manager incremental search plugin, search as you type in editor.
Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
Copyright (C) 1999-2024, Stanislav V. Mekhanoshin

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down