Skip to content

Commit

Permalink
When "Use First Line as Header" is enabled, make the header display t…
Browse files Browse the repository at this point in the history
…he first line regardless of the scroll position when the first line is hidden.
  • Loading branch information
sdottaka committed Sep 6, 2023
1 parent 5209be0 commit 50f3edb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Externals/crystaledit/editlib/ccrystaltextview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,8 @@ GetTopMarginText (const CRect& rect, CString& text, std::vector<int>& nWidths)
{
int nColumnWidth = m_pTextBuffer->GetColumnWidth (nColumn);
CString columnName;
if (m_nTopSubLine > 0 && m_nLineNumberUsedAsHeaders >= 0 && m_nLineNumberUsedAsHeaders < m_pTextBuffer->GetLineCount())
if (m_nLineNumberUsedAsHeaders >= 0 && m_nLineNumberUsedAsHeaders < m_pTextBuffer->GetLineCount() &&
(m_nTopSubLine > 0 || (m_pTextBuffer->GetLineFlags(m_nLineNumberUsedAsHeaders) & LF_INVISIBLE)))
columnName = replaceControlChars (m_pTextBuffer->GetCellText (m_nLineNumberUsedAsHeaders, nColumn).c_str ()); // Use std::basic_string<tchar_t> instead of CString
if (columnName.IsEmpty())
columnName = GetColumnName (nColumn);
Expand Down

0 comments on commit 50f3edb

Please sign in to comment.