Skip to content

Commit

Permalink
EditorCtrl - reformats
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Nov 30, 2009
1 parent c29d3cb commit ce6f8d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/EditorCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6681,17 +6681,17 @@ wxString EditorCtrl::GetFirstSelection() const {
cxENDLOCK
}

// Get the selected text
wxString EditorCtrl::GetSelText() const {
if (!m_lines.IsSelected()) return wxT("");

wxString text;
const vector<interval>& selections = m_lines.GetSelections();

cxLOCKDOC_READ(m_doc)
// Get the selected text
for (vector<interval>::const_iterator iv = selections.begin(); iv != selections.end(); ++iv) {
if (iv > selections.begin()) text += wxT('\n'); // Add newline between multiple selections

if (iv > selections.begin()) // Add newline between multiple selections
text += wxT('\n');
text += doc.GetTextPart((*iv).start, (*iv).end);
}
cxENDLOCK
Expand Down

0 comments on commit ce6f8d4

Please sign in to comment.