Skip to content

Commit

Permalink
Screen artefacts after updating QView panel
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Jul 11, 2021
1 parent 8cef77c commit 1fcdb0b
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 14 deletions.
5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
drkns 11.07.2021 16:27:30 +0100 - build 5846

1. Screen artefacts after updating QView panel.

--------------------------------------------------------------------------------
drkns 10.07.2021 15:55:20 +0100 - build 5845

Expand Down
2 changes: 1 addition & 1 deletion far/encoding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace encoding
public:
NONCOPYABLE(memory_writer);
explicit memory_writer(uintptr_t Codepage, bool AddSignature = true);
void write(string_view Str, const bool validate=true);
void write(string_view Str, bool validate = true);

void flush_to(std::ostream& Stream);

Expand Down
20 changes: 19 additions & 1 deletion far/far.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@
</Expand>
</Type>

<Type Name="matrix_view&lt;*&gt;">
<Expand>
<CustomListItems>
<Variable Name="i" InitialValue="0"/>
<Loop>
<Item Name="row[{i}]">m_Data + i * m_Rows,[m_Cols]na</Item>
<Exec>++i</Exec>
<If Condition="i == m_Rows">
<Break/>
</If>
</Loop>
</CustomListItems>
</Expand>
</Type>

<Type Name="rectangle_t&lt;*&gt;">
<DisplayString>[{left} {top} {right} {bottom}]</DisplayString>
<Expand>
Expand Down Expand Up @@ -157,6 +172,7 @@
<DisplayString Condition="is_f_index(0xe)">yellow</DisplayString>
<DisplayString Condition="is_f_index(0xf)">white</DisplayString>
<Expand>
<Item Name="index">short(ForegroundColor &amp; 0xf),xb</Item>
<Item Name="alpha">short(ForegroundRGBA.a)</Item>
</Expand>
</Synthetic>
Expand All @@ -179,6 +195,7 @@
<DisplayString Condition="is_b_index(0xe)">yellow</DisplayString>
<DisplayString Condition="is_b_index(0xf)">white</DisplayString>
<Expand>
<Item Name="index">short(BackgroundColor &amp; 0xf),xb</Item>
<Item Name="alpha">short(BackgroundRGBA.a)</Item>
</Expand>
</Synthetic>
Expand All @@ -194,13 +211,14 @@
<Item Name="strikeout">bool(Flags &amp; FCF_FG_STRIKEOUT)</Item>
<Item Name="faint">bool(Flags &amp; FCF_FG_FAINT)</Item>
<Item Name="blink">bool(Flags &amp; FCF_FG_BLINK)</Item>
<Item Name="raw">short((Flags &amp; FCF_RAWATTR_MASK) &gt;&gt; 8),h</Item>
</Expand>
</Synthetic>
</Expand>
</Type>

<Type Name="FAR_CHAR_INFO">
<DisplayString>{Char}</DisplayString>
<DisplayString>{&amp;Char,[1]sub}</DisplayString>
</Type>

<Type Name="std::chrono::duration&lt;*, std::ratio&lt;*,*&gt;&gt;">
Expand Down
12 changes: 6 additions & 6 deletions far/filelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7528,6 +7528,12 @@ void FileList::ShowFileList(bool Fast)
Parent()->GetAnotherPanel(this)->Update(UPDATE_KEEP_SELECTION | UPDATE_SECONDARY);
}

if (!ProcessingPluginCommand && LastCurFile != m_CurFile)
{
LastCurFile = m_CurFile;
UpdateViewPanel();
}

SetScreen({ m_Where.left + 1, m_Where.top + 1, m_Where.right - 1, m_Where.bottom - 1 }, L' ', colors::PaletteColorToFarColor(COL_PANELTEXT));
Box(m_Where, colors::PaletteColorToFarColor(COL_PANELBOX), DOUBLE_BOX);

Expand Down Expand Up @@ -7787,12 +7793,6 @@ void FileList::ShowFileList(bool Fast)

ShowScreensCount();

if (!ProcessingPluginCommand && LastCurFile!=m_CurFile)
{
LastCurFile=m_CurFile;
UpdateViewPanel();
}

if (m_PanelMode == panel_mode::PLUGIN_PANEL)
Parent()->RedrawKeyBar();
}
Expand Down
2 changes: 2 additions & 0 deletions far/filepanels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,8 @@ bool FilePanels::ProcessKey(const Manager::Key& Key)
AnotherPanel->Update(UPDATE_KEEP_SELECTION);

AnotherPanel->Show();

ActivePanel()->Show();
}
}
break;
Expand Down
5 changes: 0 additions & 5 deletions far/qview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,6 @@ void QuickView::ShowFile(string_view const FileName, const UserDataItem* const U
const auto ExitCode = GetDirInfo(strCurFileName, Data, nullptr, DirInfoCallback, GETDIRINFO_ENHBREAK | GETDIRINFO_SCANSYMLINKDEF);
m_DirectoryScanStatus = ExitCode == -1? scan_status::real_fail : scan_status::real_ok; // ExitCode: 1=done; 0=Esc,CtrlBreak; -1=Other
uncomplete_dirscan = ExitCode != 1;

if (const auto Window = m_Owner.lock())
{
Window->Redraw();
}
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5845
5846

0 comments on commit 1fcdb0b

Please sign in to comment.