Skip to content

Commit

Permalink
FarGroupgh-769: "Find All" list is truncated from the top on a short …
Browse files Browse the repository at this point in the history
…screen
  • Loading branch information
alabuzhev committed Dec 30, 2023
1 parent 98c87ee commit 23bf655
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
drkns 2023-12-30 01:44:13+00:00 - build 6241

1. gh-769: "Find All" list is truncated from the top on a short screen.

--------------------------------------------------------------------------------
MZK 2023-12-29 16:07:42-08:00 - build 6240

Expand Down
4 changes: 2 additions & 2 deletions far/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3747,8 +3747,8 @@ void Editor::DoSearchReplace(const SearchReplaceDisposition Disposition)

if(FindAll && MatchFound)
{
const auto MenuY1 = ScrY - 20;
const auto MenuY2 = MenuY1 + std::min(static_cast<int>(FindAllList->size()), 10) + 2;
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->SetPosition({ -1, MenuY1, 0, MenuY2 });
FindAllList->SetTitle(far::vformat(msg(lng::MEditSearchStatistics), FindAllList->size(), AllRefLines));
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6240
6241

0 comments on commit 23bf655

Please sign in to comment.