Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateview.cpp
Show First 20 Lines • Show All 2312 Lines • ▼ Show 20 Line(s) | 2307 | { | |||
---|---|---|---|---|---|
2313 | if (!selection()) { | 2313 | if (!selection()) { | ||
2314 | selectLine(m_viewInternal->m_cursor); | 2314 | selectLine(m_viewInternal->m_cursor); | ||
2315 | } | 2315 | } | ||
2316 | removeSelectedText(); | 2316 | removeSelectedText(); | ||
2317 | } | 2317 | } | ||
2318 | 2318 | | |||
2319 | void KTextEditor::ViewPrivate::copy() const | 2319 | void KTextEditor::ViewPrivate::copy() const | ||
2320 | { | 2320 | { | ||
2321 | QString text = selectionText(); | 2321 | QString text; | ||
2322 | 2322 | | |||
2323 | if (!selection()) { | 2323 | if (!selection()) { | ||
2324 | if (!m_config->smartCopyCut()) { | 2324 | if (!m_config->smartCopyCut()) { | ||
2325 | return; | 2325 | return; | ||
2326 | } | 2326 | } | ||
2327 | text = m_doc->line(m_viewInternal->m_cursor.line()) + QLatin1Char('\n'); | 2327 | text = m_doc->line(m_viewInternal->m_cursor.line()) + QLatin1Char('\n'); | ||
2328 | m_viewInternal->moveEdge(KateViewInternal::left, false); | 2328 | m_viewInternal->moveEdge(KateViewInternal::left, false); | ||
2329 | } else { | ||||
2330 | text = selectionText(); | ||||
2329 | } | 2331 | } | ||
2330 | 2332 | | |||
2331 | // copy to clipboard and our history! | 2333 | // copy to clipboard and our history! | ||
2332 | KTextEditor::EditorPrivate::self()->copyToClipboard(text); | 2334 | KTextEditor::EditorPrivate::self()->copyToClipboard(text); | ||
2333 | } | 2335 | } | ||
2334 | 2336 | | |||
2335 | void KTextEditor::ViewPrivate::applyWordWrap() | 2337 | void KTextEditor::ViewPrivate::applyWordWrap() | ||
2336 | { | 2338 | { | ||
▲ Show 20 Lines • Show All 1439 Lines • Show Last 20 Lines |