<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>309241</bug_id>
          
          <creation_ts>2012-10-30 09:36:59 +0000</creation_ts>
          <short_desc>duplicateLinesUp and duplicateLinesDown fail if first line is in selection</short_desc>
          <delta_ts>2012-11-12 09:01:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kate</product>
          <component>scripting</component>
          <version>SVN</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Gerald Senarclens de Grancy">oss</reporter>
          <assigned_to name="KWrite Developers">kwrite-bugs-null</assigned_to>
          <cc>i.zaufi</cc>
          
          <cf_commitlink>http://commits.kde.org/kate/2627ac31573304bee5748d7043b97dee9439f46f</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1310768</commentid>
    <comment_count>0</comment_count>
    <who name="Gerald Senarclens de Grancy">oss</who>
    <bug_when>2012-10-30 09:36:59 +0000</bug_when>
    <thetext>Applying duplicateLinesUp and duplicateLinesDown does not work for the first line alone and for selections containing the first line.

reproduce:
- create a document with 4 lines and write a single number on each line (1 on the first, 2 on the second, ...)
- move the cursor to the beginning of the first line
- trigger duplicateLinesDown [Ctrl]+[Alt]+[down]

expected:
- the document now has an additional line inserted before the prior second line; the content of the line should be the same as the first line (1)

actual:
- an empty line is inserted before the prior first line

note:
- duplicateLinesUp doesn&apos;t do anything in the above scenario; 
- if the selection spans more than one lines (eg. Lines 1 and 2 are entirely selected), both duplicateLinesUp and duplicateLinesDown duplicate a single line: the line below the current selection</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313976</commentid>
    <comment_count>1</comment_count>
    <who name="Christoph Cullmann">christoph</who>
    <bug_when>2012-11-09 19:31:36 +0000</bug_when>
    <thetext>Git commit 2627ac31573304bee5748d7043b97dee9439f46f by Christoph Cullmann.
Committed on 09/11/2012 at 20:31.
Pushed by cullmann into branch &apos;master&apos;.

fix issue with duplicate line of first line in document

M  +2    -2    part/script/data/commands/utils.js

http://commits.kde.org/kate/2627ac31573304bee5748d7043b97dee9439f46f</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314478</commentid>
    <comment_count>2</comment_count>
    <who name="Gerald Senarclens de Grancy">oss</who>
    <bug_when>2012-11-11 12:05:26 +0000</bug_when>
    <thetext>Just verified Christoph&apos;s fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314712</commentid>
    <comment_count>3</comment_count>
    <who name="Dominik Haumann">dhaumann</who>
    <bug_when>2012-11-12 07:32:08 +0000</bug_when>
    <thetext>Gerald, are all issues with moveLineUp/Down and duplicateLineUp/Down now fixed? If not, please open another report, thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314733</commentid>
    <comment_count>4</comment_count>
    <who name="Gerald Senarclens de Grancy">oss</who>
    <bug_when>2012-11-12 08:25:18 +0000</bug_when>
    <thetext>Dominik, unfortunately, not everything is done yet. There are three issues left and I&apos;ll try to file proper bugs after work tonight. A short summary:
- http://commits.kde.org/kate/32da84eea27a461215624cc52da019392a08889e regresses moving to the last line.
- http://commits.kde.org/kate/32da84eea27a461215624cc52da019392a08889e also introduces a bug when moving after duplicating the first lines of a document
- I am aware of one last inconsistency when duplicating: if the cursor is in the beginning of an empty line below the selection, this line will be duplicated as well; this is inconsistent with non-empty lines

I hope to get around to create automatic tests for all of these asap.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314739</commentid>
    <comment_count>5</comment_count>
    <who name="Dominik Haumann">dhaumann</who>
    <bug_when>2012-11-12 09:01:13 +0000</bug_when>
    <thetext>@Alex: Can you have a look at comment #4, since these regressions were introduced by applying your patch :^) Would be cool if we can fix this again for KDE 4.10.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>