Skip to content

Commit

Permalink
Ctrl+Numpad5 vertically aligns found text in "All matching entries"…
Browse files Browse the repository at this point in the history
… menu.

1. `Ctrl+Numpad5` in Editor menu "All matching entries" vertically aligns
   found text in all items. To preserve vertical alignment while scrolling items
   horizontally, the items can be moved beyond the left or right window edges.
2. New `far:config` `VMenu.SwapHScrollDirection` changes the meaning of left and
   right keys in all menus and lists. See `far:config` help for details.
  • Loading branch information
MKadaner committed Feb 3, 2024
1 parent 57d22bf commit 5230fdd
Show file tree
Hide file tree
Showing 15 changed files with 481 additions and 149 deletions.
3 changes: 3 additions & 0 deletions far/FarCze.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3488,6 +3488,9 @@ $ #Editor: All matching entries menu#
#Ctrl+Enter#, #Ctrl+Left mouse click#
Go to the position of the found text.

#Ctrl+Numpad5#
Vertically align all found entries.

#Gray +#
Add session bookmark with the current position.

Expand Down
3 changes: 3 additions & 0 deletions far/FarEng.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3454,6 +3454,9 @@ $ #Editor: All matching entries menu#
#Ctrl+Enter#, #Ctrl+Left mouse click#
Go to the position of the found text.

#Ctrl+Numpad5#
Vertically align all found entries.

#Gray +#
Add session bookmark with the current position.

Expand Down
3 changes: 3 additions & 0 deletions far/FarGer.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3528,6 +3528,9 @@ $ #Editor: All matching entries menu#
#Ctrl+Enter#, #Ctrl+Left mouse click#
Go to the position of the found text.

#Ctrl+Numpad5#
Vertically align all found entries.

#Gray +#
Add session bookmark with the current position.

Expand Down
3 changes: 3 additions & 0 deletions far/FarHun.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3537,6 +3537,9 @@ $ #Editor: All matching entries menu#
#Ctrl+Enter#, #Ctrl+Left mouse click#
Go to the position of the found text.

#Ctrl+Numpad5#
Vertically align all found entries.

#Gray +#
Add session bookmark with the current position.

Expand Down
3 changes: 3 additions & 0 deletions far/FarPol.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3452,6 +3452,9 @@ $ #Edytor: menu wszystkich znalezionych wystąpień#
#Ctrl+Enter#, #Ctrl+Kliknięcie lewym przyciskiem myszy#
Przechodzi do pozycji znalezionego tekstu.

#Ctrl+Numpad5#
Vertically align all found entries.

#Szary +#
Dodaje zakładkę sesji w bieżącej pozycji.

Expand Down
3 changes: 3 additions & 0 deletions far/FarRus.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3506,6 +3506,9 @@ $ #Редактор: Меню результатов поиска всех вх
#Ctrl+Enter#, #Ctrl+Щелчок левой кнопки мыши#
Перейти к позиции найденного текста.

#Ctrl+Numpad5#
Выровнять все вхождения по вертикали.

#Gray +#
Добавить сеансовую закладку с текущей позицией.

Expand Down
3 changes: 3 additions & 0 deletions far/FarSky.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3449,6 +3449,9 @@ $ #Editor: All matching entries menu#
#Ctrl+Enter#, #Ctrl+Left mouse click#
Go to the position of the found text.

#Ctrl+Numpad5#
Vertically align all found entries.

#Gray +#
Add session bookmark with the current position.

Expand Down
3 changes: 3 additions & 0 deletions far/FarUkr.hlf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3512,6 +3512,9 @@ $ #Editor: All matching entries menu#
#Ctrl+Enter#, #Ctrl+Left mouse click#
Go to the position of the found text.

#Ctrl+Numpad5#
Vertically align all found entries.

#Gray +#
Add session bookmark with the current position.

Expand Down
7 changes: 7 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
--------------------------------------------------------------------------------
MZK 2024-02-03 13:11:20-08:00 - build 6268

1. `Ctrl+Numpad5` in Editor menu "All matching entries" vertically aligns
found text in all items. To preserve vertical alignment while scrolling items
horizontally, the items can be moved beyond the left or right window edges.

--------------------------------------------------------------------------------
drkns 2024-02-03 16:21:32+00:00 - build 6267

Expand Down
1 change: 1 addition & 0 deletions far/dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2548,6 +2548,7 @@ bool Dialog::ProcessKey(const Manager::Key& Key)
case KEY_MSWHEEL_RIGHT:
case KEY_NUMENTER:
case KEY_ENTER:
case KEY_NUMPAD5:
auto& List = Items[m_FocusPos].ListPtr;
int CurListPos=List->GetSelectPos();
List->ProcessKey(Key);
Expand Down
2 changes: 1 addition & 1 deletion far/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3751,7 +3751,7 @@ void Editor::DoSearchReplace(const SearchReplaceDisposition Disposition)
{
const auto MenuY1 = std::max(0, ScrY - 20);
const auto MenuY2 = std::min(ScrY, MenuY1 + std::min(static_cast<int>(FindAllList->size()), 10) + 2);
FindAllList->SetMenuFlags(VMENU_WRAPMODE | VMENU_SHOWAMPERSAND);
FindAllList->SetMenuFlags(VMENU_WRAPMODE | VMENU_SHOWAMPERSAND | VMENU_ENABLEALIGNANNOTATIONS);
FindAllList->SetPosition({ -1, MenuY1, 0, MenuY2 });
FindAllList->SetTitle(far::vformat(msg(lng::MEditSearchStatistics), FindAllList->size(), AllRefLines));
FindAllList->SetBottomTitle(KeysToLocalizedText(KEY_CTRLENTER, KEY_F5, KEY_ADD, KEY_CTRLUP, KEY_CTRLDOWN));
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6267
6268
Loading

0 comments on commit 5230fdd

Please sign in to comment.