Commit b9646d90 authored by Dominik Haumann's avatar Dominik Haumann

Merge branch 'master' into frameworks

parents d4637826 9d06f5bc
......@@ -3,6 +3,8 @@
*
* \brief Class \c kate::CloseConfirmDialog (implementation)
*
* Copyright (C) 2012 Alex Turbov <i.zaufi@gmail.com>
*
* \date Sun Jun 24 16:29:13 MSK 2012 -- Initial design
*/
/*
......
......@@ -3,6 +3,8 @@
*
* \brief Class \c kate::CloseConfirmDialog (interface)
*
* Copyright (C) 2012 Alex Turbov <i.zaufi@gmail.com>
*
* \date Sun Jun 24 16:29:13 MSK 2012 -- Initial design
*/
/*
......
......@@ -3,6 +3,8 @@
*
* \brief Kate Close Except/Like plugin implementation
*
* Copyright (C) 2012 Alex Turbov <i.zaufi@gmail.com>
*
* \date Thu Mar 8 08:13:43 MSK 2012 -- Initial design
*/
/*
......
......@@ -3,6 +3,8 @@
*
* \brief Declate Kate's Close Except/Like plugin classes
*
* Copyright (C) 2012 Alex Turbov <i.zaufi@gmail.com>
*
* \date Thu Mar 8 08:13:43 MSK 2012 -- Initial design
*/
/*
......
......@@ -3,6 +3,8 @@
*
* \brief Class \c kate::config (interface)
*
* Copyright (C) 2012 Alex Turbov <i.zaufi@gmail.com>
*
* \date Thu Mar 8 08:19:57 MSK 2012 -- Initial design
*
* \attention DO NOT EDIT THIS FILE! IT WAS GENERATED BY CMAKE.
......
# This file is part of Pate, Kate' Python scripting plugin.
#
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
# Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......
......@@ -2,6 +2,7 @@
//
// Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
// Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
// Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
......
......@@ -2,6 +2,7 @@
//
// Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
// Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
// Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
......
......@@ -3,6 +3,7 @@
#
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
# Copyright (C) 2013 Shaheed Haque <srhaque@theiet.org>
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......
# -*- coding: utf-8 -*-
#
# This file is part of Pate, Kate' Python scripting plugin.
#
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
# Copyright (C) 2013 Shaheed Haque <srhaque@theiet.org>
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
......
# -*- coding: utf-8 -*-
#
# This file is part of Pate, Kate' Python scripting plugin.
#
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
# Copyright (C) 2013 Shaheed Haque <srhaque@theiet.org>
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
......
# -*- coding: utf-8 -*-
#
# This file is part of Pate, Kate' Python scripting plugin.
#
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
# Copyright (C) 2013 Shaheed Haque <srhaque@theiet.org>
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
......@@ -258,8 +261,8 @@ def action(func):
for tag in gui.getElementsByTagName('Action'):
# Action at least must have a name and text
# and name must be the same as a function name marked w/ @action decorator
want_it = 'name' in tag.attributes \
and 'text' in tag.attributes \
want_it = 'name' in tag.attributes.keys() \
and 'text' in tag.attributes.keys() \
and func.__name__ == tag.attributes['name'].value
if want_it:
found = True
......@@ -270,15 +273,15 @@ def action(func):
act.setText(text)
kDebug('@action/found: {} --> "{}"'.format(name, text))
# Get optional attributes
if 'shortcut' in tag.attributes:
if 'shortcut' in tag.attributes.keys():
act.setShortcut(QtGui.QKeySequence(tag.attributes['shortcut'].value))
if 'icon' in tag.attributes:
if 'icon' in tag.attributes.keys():
act.setIcon(kdeui.KIcon(tag.attributes['icon'].value))
if 'iconText' in tag.attributes:
if 'iconText' in tag.attributes.keys():
act.setIconText(tag.attributes['iconText'].value)
if 'toolTip' in tag.attributes:
if 'toolTip' in tag.attributes.keys():
act.setToolTip(tag.attributes['toolTip'].value)
if 'whatsThis' in tag.attributes:
if 'whatsThis' in tag.attributes.keys():
act.setWhatsThis(tag.attributes['whatsThis'].value)
# Connect it to the function
act.connect(act, QtCore.SIGNAL('triggered()'), func)
......
# -*- coding: utf-8 -*-
#
# This file is part of Pate, Kate' Python scripting plugin.
#
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
......
# -*- coding: utf-8 -*-
#
# This file is part of Pate, Kate' Python scripting plugin.
#
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
# Copyright (C) 2013 Shaheed Haque <srhaque@theiet.org>
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
......
# -*- coding: utf-8 -*-
#
# This file is part of Pate, Kate' Python scripting plugin.
#
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
......
......@@ -2,6 +2,7 @@
//
// Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
// Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
// Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
......
......@@ -2,6 +2,7 @@
//
// Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
// Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
// Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
......
#
# Install plugins that work with either Python 2 or 3
#
#
# Install .desktop files for individual plugins
#
install(
FILES
cmake_utils/katepate_cmake_utils.desktop
gid/katepate_gid.desktop
katepate_block.desktop
katepate_color_tools.desktop
katepate_commentar.desktop
katepate_expand.desktop
katepate_format.desktop
katepate_python_autocomplete_jedi.desktop
katepate_try_open_file.desktop
katepate_xml_pretty.desktop
python_autocomplete/katepate_python_autocomplete.desktop
python_console_classic/katepate_python_console_classic.desktop
python_console_ipython/katepate_python_console_ipython.desktop
js_utils/katepate_js_utils.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)
......@@ -28,7 +28,6 @@ install(
block.py block_ui.rc
color_tools.py color_tools_ui.rc color_tools_toolview.ui
commentar.py commentar_config.ui commentar_ui.rc
expand.py expand_ui.rc
format.py format_ui.rc
python_autocomplete_jedi.py
try_open_file.py try_open_file_ui.rc
......@@ -42,38 +41,74 @@ install(
install(
DIRECTORY
django_utils
expand
gid
libkatepate
python_console_classic
python_utils
python_autocomplete
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.py" PATTERN "*.ui" PATTERN "*.rc"
)
install(
DIRECTORY expand
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.expand"
)
install(
DIRECTORY js_utils
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.py" PATTERN "*.ui" PATTERN "*.json" PATTERN "*.js" PATTERN "*.rc"
)
install(
DIRECTORY python_console_ipython
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.py" PATTERN "*.ui" PATTERN "*.css"
)
install(
DIRECTORY cmake_utils
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.py" PATTERN "*.ui" PATTERN "*.rc"
)
#
# Install plugins that work only with Python 3 iff we're building against it
#
if(PYTHON_VERSION_MAJOR VERSION_EQUAL 3)
install(
FILES
cmake_utils/katepate_cmake_utils.desktop
katepate_expand.desktop
js_utils/katepate_js_utils.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)
install(
FILES expand.py expand_ui.rc
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
)
install(
DIRECTORY cmake_utils
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.py" PATTERN "*.ui" PATTERN "*.rc"
)
install(
DIRECTORY expand
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.py" PATTERN "*.ui" PATTERN "*.rc" PATTERN "*.expand"
)
install(
DIRECTORY js_utils
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.py" PATTERN "*.ui" PATTERN "*.json" PATTERN "*.js" PATTERN "*.rc"
)
endif()
#
# Install plugins that work only with Python 2 iff we're building against it
#
if(PYTHON_VERSION_MAJOR VERSION_EQUAL 2)
install(
FILES python_autocomplete/katepate_python_autocomplete.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)
install(
DIRECTORY python_autocomplete
DESTINATION ${DATA_INSTALL_DIR}/kate/pate
FILES_MATCHING PATTERN "*.py" PATTERN "*.ui" PATTERN "*.rc"
)
endif()
# kate: indent-width 4;
# -*- coding: utf-8 -*-
# This file is part of Pate, Kate' Python scripting plugin.
#
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
# Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) version 3.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with this library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
'''User-defined text expansions.
Each text expansion is a simple function which must return a string.
This string will be inserted into a document by the expandAtCursor action.
For example if you have a function "foo" in then all.expand file
......
# -*- coding: utf-8 -*-
#
# C/C++ related expansion functions
#
# Copyright (C) 2010-2013 Alex Turbov <i.zaufi@gmail.com>
#
# NOTE Expansion plugin can complete available expansion functions for current
# document. To get help (via tooltip) for the selected expansion function use
# Ctrl+Shift+E shotcut.
......
......@@ -38,3 +38,4 @@ Comment[tr]=Seçilen metni bir belgeye adres olarak açmaya çalış
Comment[uk]=Відкриття позначеного тексту як адреси документа
Comment[x-test]=xxTry to open selected text as URI to a documentxx
Comment[zh_TW]=試著將選取的文字做為網址來開啟
X-Python-2-Compatible=true
......@@ -2,7 +2,6 @@
#
# Copyright 2010-2013 by Alex Turbov <i.zaufi@gmail.com>
#
#
# This software is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
......
......@@ -2,7 +2,6 @@
#
# Copyright 2010-2013 by Alex Turbov <i.zaufi@gmail.com>
#
#
# This software is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
......
// This file is part of Pate, Kate' Python scripting plugin.
//
// Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
// Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
// Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
......
// This file is part of Pate, Kate' Python scripting plugin.
//
// Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
// Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
// Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
......
// This file is part of Pate, Kate' Python scripting plugin.
//
// Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
// Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
// Copyright (C) 2013 Alex Turbov <i.zaufi@gmail.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
......
......@@ -80,7 +80,7 @@ void KateProjectTreeViewContextMenu::exec(const QString& filename, const QPoint&
*/
QMenu menu;
QAction *copyAction=menu.addAction(KIcon("copy"),i18n("Copy Filename"));
QAction *copyAction=menu.addAction(KIcon("edit-copy"),i18n("Copy Filename"));
/**
* handle "open with"
......
......@@ -2959,8 +2959,6 @@ with the current document when possible</link> option is enabled in the
<guilabel>Terminal</guilabel> page of the <link
linkend="config-dialog">Main configuration dialog</link> the shell session will
change to the directory of the active document, if it is a local file.</para>
<para>This menu item is displayed by the Terminal Tool View plugin, which is
enabled by default.</para>
</listitem>
</varlistentry>
......@@ -2968,8 +2966,7 @@ enabled by default.</para>
<term><menuchoice><guimenu>Tools</guimenu><guimenuitem>Pipe to
Terminal</guimenuitem></menuchoice></term>
<listitem><para>Feed the currently selected text into the built-in terminal
emulator. No newline is added after the text. This menu item is displayed by the
Terminal Tool View plugin, which is enabled by default.</para></listitem>
emulator. No newline is added after the text.</para></listitem>
</varlistentry>
<varlistentry>
......@@ -2978,8 +2975,7 @@ Terminal Tool View plugin, which is enabled by default.</para></listitem>
<guimenuitem>Synchronize Terminal with Current Document</guimenuitem></menuchoice></term>
<listitem>
<para>This will cause the built-in Terminal to <command>cd</command> into the
directory of the active document. This menu item is also displayed
by the Terminal Tool View plugin.</para>
directory of the active document.</para>
<para>Alternatively, you can configure &kappname; to always keep the terminal in
sync with the current document. See
......@@ -2993,7 +2989,7 @@ sync with the current document. See
<guimenuitem>Focus/Defocus Terminal</guimenuitem></menuchoice></term>
<listitem>
<para>Switch the focus from the current document to the terminal and vice versa.
This menu item is also displayed by the Terminal Tool View plugin.</para>
</para>
</listitem>
</varlistentry>
......
......@@ -65,6 +65,8 @@
//END Includes
static const qint64 FileSizeAboveToAskUserIfProceedWithOpen = 10 * 1024 * 1024; // 10MB should suffice
KateViewManager::KateViewManager (QWidget *parentW, KateMainWindow *parent)
: QSplitter (parentW)
, m_mainWindow(parent)
......@@ -255,6 +257,27 @@ void KateViewManager::slotDocumentOpen ()
KateDocumentInfo docInfo;
docInfo.openedByUser = true;
QString fileList;
foreach ( const KUrl &url, r.URLs )
{
qint64 size = QFile( url.toLocalFile() ).size();
if ( size > FileSizeAboveToAskUserIfProceedWithOpen )
{
fileList += QString("<li>%1 (%2MB)</li>").arg( url.fileName() ).arg( size / 1024 / 1024 );
}
}
if ( !fileList.isEmpty() )
{
QString text = i18n( "<p>You are attempting to open one or more large files:</p><ul>%1</ul><p>Do you want to proceed?</p><p><strong>Beware that kate may stop responding for some time when opening large files.</strong></p>" );
int ret = KMessageBox::warningYesNo( this, text.arg( fileList ), i18n("Opening Large File"), KStandardGuiItem::cont(), KStandardGuiItem::stop() );
if ( ret == KMessageBox::No )
return;
}
KTextEditor::Document *lastID = 0;
for (KUrl::List::Iterator i = r.URLs.begin(); i != r.URLs.end(); ++i)
lastID = openUrl( *i, r.encoding, false, false, docInfo);
......
......@@ -57,7 +57,7 @@ KateFileTree::KateFileTree(QWidget *parent): QTreeView(parent)
connect( m_filelistCloseDocument, SIGNAL(triggered()), this, SLOT(slotDocumentClose()) );
m_filelistCloseDocument->setWhatsThis(i18n("Close the current document."));
m_filelistCopyFilename = new QAction( KIcon("copy"), i18n( "Copy Filename" ), this );
m_filelistCopyFilename = new QAction( KIcon("edit-copy"), i18n( "Copy Filename" ), this );
connect( m_filelistCopyFilename, SIGNAL(triggered()), this, SLOT(slotCopyFilename()) );
m_filelistCopyFilename->setWhatsThis(i18n("Copy the filename of the file."));
......
......@@ -26,7 +26,7 @@
**********************************************************************
-->
<!-- generated for "cmake version 2.8.11.1" -->
<language name="CMake" version="1.22" kateversion="2.4" section="Other" extensions="CMakeLists.txt;*.cmake;" mimetype="" author="Alexander Neundorf (neundorf@kde.org)" license="LGPL">
<language name="CMake" version="1.23" kateversion="2.4" section="Other" extensions="CMakeLists.txt;*.cmake;" mimetype="" author="Alexander Neundorf (neundorf@kde.org)" license="LGPL">
<highlighting>
<!-- ATTENTION Do not change the list name! Or change a generation script accordingly -->
......@@ -897,9 +897,10 @@
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Macro Args">
<DetectChar attribute="Normal Text" context="#pop" char=")"/>
<!-- TODO Hmm... this rule looks strange... being in the Normal context -->
<StringDetect attribute="Escapes" context="#stay" String="\&quot;"/>
<DetectChar attribute="Strings" context="String" char="&quot;"/>
<RegExpr attribute="Comment" context="#stay" String="#.*$"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
<IncludeRules context="Detect Builtin Variables"/>
<IncludeRules context="Detect Variables"/>
<IncludeRules context="Detect Generator Expressions"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- Author: Dr Orlovsky MA <maxim@orlovsky.info> //-->
<language name="YAML" version="1.1" kateversion="2.3" section="Markup"
<language name="YAML" version="1.2" kateversion="2.3" section="Markup"
extensions="*.yaml;*.yml" mimetype="text/yaml"
author="Dr Orlovsky MA (dr.orlovsky@gmail.com)" license="LGPL">
<highlighting>
......@@ -140,13 +140,12 @@
<DetectIdentifier />
<DetectChar attribute="String" context="attribute-end-inline" char="'" endRegion="String" />
</context>
<context attribute="String" lineEndContext="#stay" name="attribute-stringx-inline">
<DetectIdentifier />
<DetectChar attribute="String" context="attribute-end-inline" char="&quot;" endRegion="String" />
</context>
<context attribute="Error" lineEndContext="#pop#pop#pop" name="attribute-end">
</context>
......@@ -156,8 +155,6 @@
<RegExpr attribute="Operator" context="#pop#pop#pop" String=",\s"/>
</context>
<context attribute="String" lineEndContext="#stay" name="string">
<DetectIdentifier />
<DetectChar attribute="String" context="#pop" char="'" endRegion="String" />
......@@ -169,9 +166,12 @@
</context>
<context attribute="Comment" lineEndContext="#pop" name="comment">
<IncludeRules context="##Alerts" />
<IncludeRules context="##Modelines" />
</context>
</contexts>
<itemDatas>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="List" defStyleNum="dsNormal" />
<itemData name="Hash" defStyleNum="dsNormal" />
......@@ -184,13 +184,14 @@
<itemData name="Key" defStyleNum="dsFunction" />
<itemData name="Directive" defStyleNum="dsOthers" />
<itemData name="Operator" defStyleNum="dsKeyword" />
<itemData name="String" defStyleNum="dsNormal" />
<itemData name="String" defStyleNum="dsString" />
<itemData name="Error" defStyleNum="dsError" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="#"/>
<comment name="singleLine" start="#" position="afterwhitespace" />
</comments>
<keywords casesensitive="1"/>
</general>
......
......@@ -90,7 +90,6 @@ KateViewInternal::KateViewInternal(KateView *view)
, m_layoutCache(new KateLayoutCache(renderer(), this))
, m_preserveX(false)
, m_preservedX(0)
, m_updatingView(true)
, m_cachedMaxStartPos(-1, -1)
, m_dragScrollTimer(this)
, m_scrollTimer (this)
......@@ -99,7 +98,6 @@ KateViewInternal::KateViewInternal(KateView *view)
, m_textHintEnabled(false)
, m_textHintPos(-1, -1)
, m_imPreeditRange(0)
, m_smartDirty(false)
, m_viInputMode(false)
, m_viInputModeManager (0)
{
......@@ -504,12 +502,15 @@ void KateViewInternal::scrollPos(KTextEditor::Cursor& c, bool force, bool called
void KateViewInternal::scrollColumns ( int x )
{
if (x == m_startX)
return;
if (x < 0)
x = 0;
if (x > m_columnScroll->maximum())
x = m_columnScroll->maximum();
if (x == m_startX)
return;
int dx = m_startX - x;
m_startX = x;
......@@ -541,8 +542,6 @@ void KateViewInternal::doUpdateView(bool changed, int viewLinesScrolled)
if(!isVisible() && !viewLinesScrolled )
return; //When this view is not visible, don't do anything
m_updatingView = true;
bool blocked = m_lineScroll->blockSignals(true);
if (width() != cache()->viewWidth()) {
......@@ -612,11 +611,6 @@ void KateViewInternal::doUpdateView(bool changed, int viewLinesScrolled)
}
m_dummy->setVisible( visible_dummy );
if (m_smartDirty)
m_smartDirty = false;
m_updatingView = false;
}
/**
......@@ -2951,9 +2945,6 @@ void KateViewInternal::hideEvent(QHideEvent* e)
void KateViewInternal::paintEvent(QPaintEvent *e)
{
if (m_smartDirty)
doUpdateView();
if (debugPainting) kDebug (13030) << "GOT PAINT EVENT: Region" << e->region();
const QRect& unionRect = e->rect();
......@@ -3091,8 +3082,10 @@ void KateViewInternal::resizeEvent(QResizeEvent* e)
if (expandedVertically) {
KTextEditor::Cursor max = maxStartPos();
if (startPos() > max)
if (startPos() > max) {
scrollPos(max);
return; // already fired displayRangeChanged
}
}
emit m_view->displayRangeChanged(m_view);
}
......
......@@ -365,7 +365,6 @@ class KateViewInternal : public QWidget
bool m_preserveX;
int m_preservedX;
bool m_updatingView;
int m_wrapChangeViewLine;
KTextEditor::Cursor m_cachedMaxStartPos;
......@@ -421,9 +420,6 @@ class KateViewInternal : public QWidget
void mouseMoved();
void cursorMoved();
private:
bool m_smartDirty;
private:
inline KateDocument *doc() { return m_view->doc(); }
inline KateDocument *doc() const { return m_view->doc(); }
......
......@@ -659,132 +659,17 @@ const QString KateViKeyParser::decodeKeySequence( const QString &keys ) const
return ret;
}
char KateViKeyParser::scanCodeToChar(quint32 code, Qt::KeyboardModifiers modifiers, bool isLetter) const
{
//Do not forget to ignore letters with shift. Should work with punctuation and special characters ($, ^) only.
//any punctuation (without shift) that has different signs in different layouts should be added to the second switch.
if ((modifiers & Qt::ShiftModifier) && !isLetter)
{
switch(code)
{
case 10:
return '!';
case 11:
return '@';
case 12:
return '#';
case 13:
return '$';
case 14:
return '%';
case 15:
return '^';