Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gede for openSUSE:Factory checked in 
at 2024-11-25 23:22:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gede (Old)
 and      /work/SRC/openSUSE:Factory/.gede.new.28523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gede"

Mon Nov 25 23:22:35 2024 rev:7 rq:1226229 version:2.20.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/gede/gede.changes        2024-11-19 
22:16:27.975342454 +0100
+++ /work/SRC/openSUSE:Factory/.gede.new.28523/gede.changes     2024-11-25 
23:22:55.142221759 +0100
@@ -1,0 +2,6 @@
+Mon Nov 25 06:24:21 UTC 2024 - Bruno Pitrus <[email protected]>
+
+- New upstream version 2.20.2
+  * Fixed incorrect cursor position in console output
+
+-------------------------------------------------------------------

Old:
----
  v2.20.1.tar.gz

New:
----
  v2.20.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gede.spec ++++++
--- /var/tmp/diff_new_pack.Myh3qP/_old  2024-11-25 23:22:56.898294957 +0100
+++ /var/tmp/diff_new_pack.Myh3qP/_new  2024-11-25 23:22:56.902295124 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           gede
-Version:        2.20.1
+Version:        2.20.2
 Release:        0
 Summary:        Qt-based GUI to GDB
 License:        BSD-2-Clause

++++++ v2.20.1.tar.gz -> v2.20.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gede-2.20.1/src/consolewidget.cpp 
new/gede-2.20.2/src/consolewidget.cpp
--- old/gede-2.20.1/src/consolewidget.cpp       2024-11-15 02:19:27.000000000 
+0100
+++ new/gede-2.20.2/src/consolewidget.cpp       2024-11-24 22:06:41.000000000 
+0100
@@ -177,7 +177,7 @@
 {
     int rowHeight = getRowHeight();
     QPainter painter(this);
-
+    const int leftMargin = 5;
 
 
     if(m_cfg)
@@ -189,11 +189,27 @@
     if(m_cursorMode == BLINK_ON || m_cursorMode == STEADY)
     {
         QRect r;
-        int charWidth = m_fontInfo->horizontalAdvance(" ");
-        r.setX(charWidth*m_cursorX+5);
+
+        // Get the line where the cursor is
+        QString line;
+        if(m_cursorY < m_lines.size())
+        {
+            for(Block blk : m_lines[m_cursorY])
+                line += blk.text;
+        }
+        if(line.length() <= m_cursorX)
+            line += QString(m_cursorX-line.length(), ' ');
+
+        // Set the x and y position of the cursor
+        r.setX(m_fontInfo->horizontalAdvance(line.left(m_cursorX))+leftMargin);
         r.setY(rowHeight*((m_cursorY+m_origoY)-m_dispOrigoY));
-        r.setWidth(charWidth);
+
+        // Set height and width of cursor
+        int cursorWidth = m_fontInfo->horizontalAdvance(" ");
+        r.setWidth(cursorWidth);
         r.setHeight(rowHeight);
+
+        // Draw the cursor
         if(m_cfg)
         {
             if(hasFocus())
@@ -213,7 +229,7 @@
         Line &line = m_lines[rowIdx];
 
         int y = rowHeight*(rowIdx-m_dispOrigoY);
-        int x = 5;
+        int x = leftMargin;
         int curCharIdx = 0;
         
         // Draw line number
@@ -223,15 +239,23 @@
         {
             Block &blk = line[blockIdx];
             painter.setPen(getFgColor(blk.m_fgColor));
+
+            // Cursor in the middle of the block of text?
             if((m_cursorY+m_origoY) == rowIdx && curCharIdx <= m_cursorX && 
m_cursorX < curCharIdx+blk.text.size())
             {
                 int cutIdx = m_cursorX-curCharIdx;
                 QString leftText = blk.text.left(cutIdx);
                 QChar cutLetter = blk.text[cutIdx];
                 QString rightText = blk.text.mid(cutIdx+1);
+
+                // Draw left part
                 painter.drawText(x, fontY, leftText);
+                
+                // Draw character in cursor
                 painter.setPen(getBgColor(blk.m_bgColor));
                 painter.drawText(x+m_fontInfo->horizontalAdvance(leftText), 
fontY, QString(cutLetter));
+
+                // Draw right part
                 painter.setPen(getFgColor(blk.m_fgColor));
                 painter.drawText(x+m_fontInfo->horizontalAdvance(leftText + 
cutLetter), fontY, rightText);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gede-2.20.1/src/version.h 
new/gede-2.20.2/src/version.h
--- old/gede-2.20.1/src/version.h       2024-11-15 02:19:27.000000000 +0100
+++ new/gede-2.20.2/src/version.h       2024-11-24 22:06:41.000000000 +0100
@@ -11,7 +11,7 @@
 
 #define GD_MAJOR 2
 #define GD_MINOR 20
-#define GD_PATCH 1
+#define GD_PATCH 2
 
 
 #endif // FILE__VERSION_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gede-2.20.1/tagit.py new/gede-2.20.2/tagit.py
--- old/gede-2.20.1/tagit.py    2024-11-15 02:19:27.000000000 +0100
+++ new/gede-2.20.2/tagit.py    2024-11-24 22:06:41.000000000 +0100
@@ -31,7 +31,7 @@
             patch = words[3]
 
     if minor != "" and major != "" and patch != "":
-        tagName = ("rel-%s.%s.%s" % (major, minor, patch))
+        tagName = ("v%s.%s.%s" % (major, minor, patch))
         print("Tagging with '%s'" % (tagName))
         os.system("git tag -a -m \"%s\" %s" % (tagName, tagName))
         print("Push tag with command:")

Reply via email to