[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Review Request 115443: Added a "Relative line numbers" option.
From: Miquel_Sabaté_Solà <mikisabate () gmail ! com>
Date: 2014-02-03 10:01:42
Message-ID: 20140203100142.18034.8697 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115443/
-----------------------------------------------------------
Review request for Kate.
Repository: kate
Description
-------
Ok, here it goes a "crazy" idea :) In vim there's the "relativenumber" option. In \
short, this means that in the left border we no longer have absolute line numbers but \
line numbers relative to the current cursor (see the "relative.png" attachment). This \
is useful since in vim all commands accept an optional number (that is relative to \
the current cursor). This feature is, of course, configurable and set to false by \
default. Moreover since this is a feature that, in my opinion, only makes sense in \
vim, I've added this option under the "Vi Input Mode" tab in the configuration (see \
the "relative1.png" attachment).
This is cool and everything, but it's not fully working yet :( We don't want to be \
updating the left border all the time (otherwise the CPU usage goes kind of crazy, \
20% more or less with KWrite). I'm only updating the left border when the user moves \
up or down. However, in some situations the line numbering does not update. An \
example of this is opening a large file, going in the middle of the file and then \
starting to move up and down. For some reason in this situation the left border is \
not updated. Since I'm kind of new to the KateView code, I'd like to hear suggestions \
and tips so we can fix this issue :P
Thanks for your time :) !
Diffs
-----
part/view/kateviewinternal.cpp c4aaf36
part/view/kateviewinternal.h 5d7c2f4
part/view/kateviewhelpers.cpp a53a57f
part/view/kateviewhelpers.h b95434f
part/view/kateview.cpp 9d9cff6
part/view/kateview.h c707298
part/utils/kateconfig.cpp 7667aee
part/utils/kateconfig.h a932533
part/dialogs/viinputmodeconfigwidget.ui 29a5257
part/dialogs/katedialogs.cpp aa0acba
Diff: https://git.reviewboard.kde.org/r/115443/diff/
Testing
-------
Manual testing. It's not working properly yet, take a look at the "Description" \
section above.
File Attachments
----------------
A snapshot
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/03/09554ab4-fc68-4044-8629-3aa6c65e0f10__relative.png
Option
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/03/88e089f9-a3ab-4622-b9a0-d017ab57b349__relative1.png
Thanks,
Miquel Sabaté SolÃ
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/115443/">https://git.reviewboard.kde.org/r/115443/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Kate.</div>
<div>By Miquel Sabaté Solà .</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Ok, here it goes a "crazy" idea :) In vim there's the \
"relativenumber" option. In short, this means that in the left border we no \
longer have absolute line numbers but line numbers relative to the current cursor \
(see the "relative.png" attachment). This is useful since in vim all \
commands accept an optional number (that is relative to the current cursor). This \
feature is, of course, configurable and set to false by default. Moreover since this \
is a feature that, in my opinion, only makes sense in vim, I've added this option \
under the "Vi Input Mode" tab in the configuration (see the \
"relative1.png" attachment).
This is cool and everything, but it's not fully working yet :( We don't want \
to be updating the left border all the time (otherwise the CPU usage goes kind of \
crazy, 20% more or less with KWrite). I'm only updating the left border when the \
user moves up or down. However, in some situations the line numbering does not \
update. An example of this is opening a large file, going in the middle of the file \
and then starting to move up and down. For some reason in this situation the left \
border is not updated. Since I'm kind of new to the KateView code, I'd like \
to hear suggestions and tips so we can fix this issue :P
Thanks for your time :) !</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Manual testing. It's not working properly yet, take a look at the \
"Description" section above.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>part/view/kateviewinternal.cpp <span style="color: grey">(c4aaf36)</span></li>
<li>part/view/kateviewinternal.h <span style="color: grey">(5d7c2f4)</span></li>
<li>part/view/kateviewhelpers.cpp <span style="color: grey">(a53a57f)</span></li>
<li>part/view/kateviewhelpers.h <span style="color: grey">(b95434f)</span></li>
<li>part/view/kateview.cpp <span style="color: grey">(9d9cff6)</span></li>
<li>part/view/kateview.h <span style="color: grey">(c707298)</span></li>
<li>part/utils/kateconfig.cpp <span style="color: grey">(7667aee)</span></li>
<li>part/utils/kateconfig.h <span style="color: grey">(a932533)</span></li>
<li>part/dialogs/viinputmodeconfigwidget.ui <span style="color: \
grey">(29a5257)</span></li>
<li>part/dialogs/katedialogs.cpp <span style="color: grey">(aa0acba)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115443/diff/" style="margin-left: \
3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>
<ul>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/03/09554ab4-fc68-4044-8629-3aa6c65e0f10__relative.png">A \
snapshot</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/03/88e089f9-a3ab-4622-b9a0-d017ab57b349__relative1.png">Option</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic