MCPcopy Create free account
hub / github.com/WinMerge/winmerge / popPosition

Method popPosition

Src/GhostTextView.cpp:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void CGhostTextView::popPosition(const SCursorPushed& Ssrc, CEPoint & pt)
77{
78 pt.x = Ssrc.x;
79 pt.y = m_pGhostTextBuffer->ComputeApparentLine(Ssrc.y, Ssrc.nToFirstReal);
80 // if the cursor was in a trailing ghost line, and this disappeared,
81 // got at the end of the last line
82 if (pt.y >= GetLineCount())
83 {
84 pt.y = GetLineCount()-1;
85 pt.x = GetLineLength(pt.y);
86 }
87 if (pt.y < 0)
88 pt.y = 0;
89}
90
91void CGhostTextView::pushPosition(SCursorPushed & Sdest, CEPoint pt)
92{

Callers

nothing calls this directly

Calls 2

GetLineLengthFunction · 0.85
ComputeApparentLineMethod · 0.45

Tested by

no test coverage detected