Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package neovim-gtk for openSUSE:Factory 
checked in at 2021-02-15 23:17:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/neovim-gtk (Old)
 and      /work/SRC/openSUSE:Factory/.neovim-gtk.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "neovim-gtk"

Mon Feb 15 23:17:28 2021 rev:4 rq:872044 version:0.2.0+git.1609586374.c036492

Changes:
--------
--- /work/SRC/openSUSE:Factory/neovim-gtk/neovim-gtk.changes    2020-01-27 
00:23:23.361523899 +0100
+++ /work/SRC/openSUSE:Factory/.neovim-gtk.new.28504/neovim-gtk.changes 
2021-02-15 23:19:55.567720734 +0100
@@ -1,0 +2,10 @@
+Fri Feb 12 22:31:10 UTC 2021 - Matej Cepl <mc...@cepl.eu>
+
+- Update to version 0.2.0+git.1609586374.c036492:
+  * Delete FUNDING.yml
+  * Adds an option to change cursor blinking
+  * Update README with Debian install instructions
+  * Add support for strikethrough
+  * Fix underlines/undercurl rendering
+
+-------------------------------------------------------------------

Old:
----
  neovim-gtk-0.2.0+git.1579960262.0af8952.tar.xz

New:
----
  neovim-gtk-0.2.0+git.1609586374.c036492.tar.xz

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

Other differences:
------------------
++++++ neovim-gtk.spec ++++++
--- /var/tmp/diff_new_pack.O3ifma/_old  2021-02-15 23:19:56.391721965 +0100
+++ /var/tmp/diff_new_pack.O3ifma/_new  2021-02-15 23:19:56.395721970 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package neovim-gtk
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,18 +20,23 @@
 %define binname nvim-gtk
 
 Name:           neovim-gtk
-Version:        0.2.0+git.1579960262.0af8952
+Version:        0.2.0+git.1609586374.c036492
 Release:        0
 Summary:        GTK UI for Neovim
 License:        GPL-3.0-only
 Group:          Productivity/Text/Editors
 URL:            https://github.com/daa84/neovim-gtk
 Source0:        neovim-gtk-%{version}.tar.xz
+# cargo build && cargo vendor && tar cvJf neovim-gtk-vendor.tar.xz
 Source1:        neovim-gtk-vendor.tar.xz
 BuildRequires:  cargo
-BuildRequires:  gtk3-devel
 BuildRequires:  hicolor-icon-theme
 BuildRequires:  pango-devel
+BuildRequires:  pkg-config
+BuildRequires:  pkgconfig(cairo-gobject)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gtk+-3.0)
+BuildRequires:  pkgconfig(pango) >= 0.9.0
 
 %description
 GTK UI for Neovim written in Rust using gtk-rs bindings. With ligatures

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.O3ifma/_old  2021-02-15 23:19:56.435722030 +0100
+++ /var/tmp/diff_new_pack.O3ifma/_new  2021-02-15 23:19:56.439722036 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">https://github.com/daa84/neovim-gtk</param>
-    <param 
name="changesrevision">0af8952171c5375a4435cf3790e08c3b9ee29e8d</param>
+    <param 
name="changesrevision">c03649276ee47caa9bc7beb68f6c800b8c97651a</param>
   </service>
 </servicedata>
\ No newline at end of file

++++++ neovim-gtk-0.2.0+git.1579960262.0af8952.tar.xz -> 
neovim-gtk-0.2.0+git.1609586374.c036492.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/neovim-gtk-0.2.0+git.1579960262.0af8952/README.md 
new/neovim-gtk-0.2.0+git.1609586374.c036492/README.md
--- old/neovim-gtk-0.2.0+git.1579960262.0af8952/README.md       2020-01-25 
14:51:02.000000000 +0100
+++ new/neovim-gtk-0.2.0+git.1609586374.c036492/README.md       2021-01-02 
12:19:34.000000000 +0100
@@ -44,8 +44,8 @@
 ## Linux
 First install the GTK development packages. On Debian/Ubuntu derivatives
 this can be done as follows:
-```
-apt install libatk1.0-dev libcairo2-dev libgdk-pixbuf2.0-dev libglib2.0-dev 
libgtk-3-dev libpango1.0-dev
+``` shell
+apt install libgtk-3-dev
 ```
 
 On Fedora:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/neovim-gtk-0.2.0+git.1579960262.0af8952/runtime/plugin/nvim_gui_shim.vim 
new/neovim-gtk-0.2.0+git.1609586374.c036492/runtime/plugin/nvim_gui_shim.vim
--- 
old/neovim-gtk-0.2.0+git.1579960262.0af8952/runtime/plugin/nvim_gui_shim.vim    
    2020-01-25 14:51:02.000000000 +0100
+++ 
new/neovim-gtk-0.2.0+git.1609586374.c036492/runtime/plugin/nvim_gui_shim.vim    
    2021-01-02 12:19:34.000000000 +0100
@@ -62,4 +62,5 @@
 command! NGShowProjectView call rpcnotify(1, 'Gui', 'Command', 
'ShowProjectView')
 command! -nargs=+ NGTransparency call rpcnotify(1, 'Gui', 'Command', 
'Transparency', <f-args>)
 command! -nargs=1 NGPreferDarkTheme call rpcnotify(1, 'Gui', 'Command', 
'PreferDarkTheme', <q-args>)
+command! -nargs=1 NGSetCursorBlink call rpcnotify(1, 'Gui', 'Command', 
'SetCursorBlink', <q-args>)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/cursor.rs 
new/neovim-gtk-0.2.0+git.1609586374.c036492/src/cursor.rs
--- old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/cursor.rs   2020-01-25 
14:51:02.000000000 +0100
+++ new/neovim-gtk-0.2.0+git.1609586374.c036492/src/cursor.rs   2021-01-02 
12:19:34.000000000 +0100
@@ -41,12 +41,24 @@
     Busy,
 }
 
+struct BlinkCount {
+    count: u32,
+    max: u32,
+}
+
+impl BlinkCount {
+    fn new(max: u32) -> Self {
+        Self { count: 0, max }
+    }
+}
+
 struct State<CB: CursorRedrawCb> {
     alpha: Alpha,
     anim_phase: AnimPhase,
     redraw_cb: Weak<UiMutex<CB>>,
 
     timer: Option<glib::SourceId>,
+    counter: Option<BlinkCount>,
 }
 
 impl<CB: CursorRedrawCb> State<CB> {
@@ -56,6 +68,7 @@
             anim_phase: AnimPhase::Shown,
             redraw_cb,
             timer: None,
+            counter: None,
         }
     }
 
@@ -130,6 +143,15 @@
         self.mode_info = mode_info;
     }
 
+    pub fn set_cursor_blink(&mut self, val: i32) {
+        let mut mut_state = self.state.borrow_mut();
+        mut_state.counter = if val < 0 {
+            None
+        } else {
+            Some(BlinkCount::new(val as u32))
+        }
+    }
+
     pub fn start(&mut self) {
         let blinkwait = self
             .mode_info
@@ -139,7 +161,13 @@
 
         let state = self.state.clone();
         let mut mut_state = self.state.borrow_mut();
+
         mut_state.reset_to(AnimPhase::Shown);
+
+        if let Some(counter) = &mut mut_state.counter {
+            counter.count = 0;
+        }
+
         mut_state.timer = Some(glib::timeout_add(
             if blinkwait > 0 { blinkwait } else { 500 },
             move || anim_step(&state),
@@ -288,8 +316,18 @@
 
     let next_event = match mut_state.anim_phase {
         AnimPhase::Shown => {
-            mut_state.anim_phase = AnimPhase::Hide;
-            Some(60)
+            if let Some(counter) = &mut mut_state.counter {
+                if counter.count < counter.max {
+                    counter.count += 1;
+                    mut_state.anim_phase = AnimPhase::Hide;
+                    Some(60)
+                } else {
+                    None
+                }
+            } else {
+                mut_state.anim_phase = AnimPhase::Hide;
+                Some(60)
+            }
         }
         AnimPhase::Hide => {
             if !mut_state.alpha.hide(0.3) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/highlight.rs 
new/neovim-gtk-0.2.0+git.1609586374.c036492/src/highlight.rs
--- old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/highlight.rs        
2020-01-25 14:51:02.000000000 +0100
+++ new/neovim-gtk-0.2.0+git.1609586374.c036492/src/highlight.rs        
2021-01-02 12:19:34.000000000 +0100
@@ -94,12 +94,7 @@
             })
     }
 
-    pub fn set(
-        &mut self,
-        idx: u64,
-        hl: &HashMap<String, Value>,
-        info: &[HashMap<String, Value>],
-    ) {
+    pub fn set(&mut self, idx: u64, hl: &HashMap<String, Value>, info: 
&[HashMap<String, Value>]) {
         let hl = Rc::new(Highlight::from_value_map(&hl));
 
         for item in info {
@@ -161,17 +156,29 @@
 
     pub fn pmenu_bg_sel(&self) -> &Color {
         if !self.pmenu_sel.reverse {
-            self.pmenu_sel.background.as_ref().unwrap_or_else(|| self.bg())
-        } else {
-            self.pmenu_sel.foreground.as_ref().unwrap_or_else(|| self.fg())
+            self.pmenu_sel
+                .background
+                .as_ref()
+                .unwrap_or_else(|| self.bg())
+        } else {
+            self.pmenu_sel
+                .foreground
+                .as_ref()
+                .unwrap_or_else(|| self.fg())
         }
     }
 
     pub fn pmenu_fg_sel(&self) -> &Color {
         if !self.pmenu_sel.reverse {
-            self.pmenu_sel.foreground.as_ref().unwrap_or_else(|| self.fg())
-        } else {
-            self.pmenu_sel.background.as_ref().unwrap_or_else(|| self.bg())
+            self.pmenu_sel
+                .foreground
+                .as_ref()
+                .unwrap_or_else(|| self.fg())
+        } else {
+            self.pmenu_sel
+                .background
+                .as_ref()
+                .unwrap_or_else(|| self.bg())
         }
     }
 
@@ -190,6 +197,7 @@
     pub bold: bool,
     pub underline: bool,
     pub undercurl: bool,
+    pub strikethrough: bool,
     pub foreground: Option<Color>,
     pub background: Option<Color>,
     pub special: Option<Color>,
@@ -206,6 +214,7 @@
             bold: false,
             underline: false,
             undercurl: false,
+            strikethrough: false,
             reverse: false,
         }
     }
@@ -235,6 +244,7 @@
                 "italic" => model_attrs.italic = true,
                 "underline" => model_attrs.underline = true,
                 "undercurl" => model_attrs.undercurl = true,
+                "strikethrough" => model_attrs.strikethrough = true,
                 attr_key => error!("unknown attribute {}", attr_key),
             };
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/nvim/redraw_handler.rs 
new/neovim-gtk-0.2.0+git.1609586374.c036492/src/nvim/redraw_handler.rs
--- old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/nvim/redraw_handler.rs      
2020-01-25 14:51:02.000000000 +0100
+++ new/neovim-gtk-0.2.0+git.1609586374.c036492/src/nvim/redraw_handler.rs      
2021-01-02 12:19:34.000000000 +0100
@@ -182,6 +182,16 @@
 
                     
ui.on_command(NvimCommand::PreferDarkTheme(prefer_dark_theme))
                 }
+                "SetCursorBlink" => {
+                    let blink_count =
+                        match try_str!(args.get(1).cloned().unwrap_or_else(|| 
Value::from(-1)))
+                            .parse::<i32>()
+                        {
+                            Ok(val) => val,
+                            Err(_) => -1,
+                        };
+                    ui.set_cursor_blink(blink_count);
+                }
                 _ => error!("Unknown command"),
             };
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/render/context.rs 
new/neovim-gtk-0.2.0+git.1609586374.c036492/src/render/context.rs
--- old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/render/context.rs   
2020-01-25 14:51:02.000000000 +0100
+++ new/neovim-gtk-0.2.0+git.1609586374.c036492/src/render/context.rs   
2021-01-02 12:19:34.000000000 +0100
@@ -49,7 +49,8 @@
                     &line.attr_list,
                     attr_iter.as_ref(),
                 )
-            }).collect()
+            })
+            .collect()
     }
 
     pub fn create_layout(&self) -> pango::Layout {
@@ -103,6 +104,8 @@
     pub ascent: f64,
     pub underline_position: f64,
     pub underline_thickness: f64,
+    pub strikethrough_position: f64,
+    pub strikethrough_thickness: f64,
     pub pango_ascent: i32,
     pub pango_descent: i32,
     pub pango_char_width: i32,
@@ -112,7 +115,23 @@
     fn new(font_metrics: &pango::FontMetrics, line_space: i32) -> Self {
         let ascent = (f64::from(font_metrics.get_ascent()) / 
f64::from(pango::SCALE)).ceil();
         let descent = (f64::from(font_metrics.get_descent()) / 
f64::from(pango::SCALE)).ceil();
-        let underline_position = 
(f64::from(font_metrics.get_underline_position()) / 
f64::from(pango::SCALE)).ceil();
+
+        // distance above top of underline, will typically be negative
+        let pango_underline_position = 
f64::from(font_metrics.get_underline_position());
+        let underline_position = (pango_underline_position / 
f64::from(pango::SCALE))
+            .abs()
+            .ceil()
+            .copysign(pango_underline_position);
+
+        let underline_thickness =
+            (f64::from(font_metrics.get_underline_thickness()) / 
f64::from(pango::SCALE)).ceil();
+
+        let strikethrough_position =
+            (f64::from(font_metrics.get_strikethrough_position()) / 
f64::from(pango::SCALE)).ceil();
+        let strikethrough_thickness = 
(f64::from(font_metrics.get_strikethrough_thickness())
+            / f64::from(pango::SCALE))
+        .ceil();
+
         CellMetrics {
             pango_ascent: font_metrics.get_ascent(),
             pango_descent: font_metrics.get_descent(),
@@ -121,8 +140,10 @@
             line_height: ascent + descent + f64::from(line_space),
             char_width: f64::from(font_metrics.get_approximate_char_width())
                 / f64::from(pango::SCALE),
-            underline_position: ascent - underline_position,
-            underline_thickness: 
f64::from(font_metrics.get_underline_thickness()) / f64::from(pango::SCALE),
+            underline_position: ascent - underline_position + 
underline_thickness / 2.0,
+            underline_thickness,
+            strikethrough_position: ascent - strikethrough_position + 
strikethrough_thickness / 2.0,
+            strikethrough_thickness,
         }
     }
 
@@ -137,6 +158,8 @@
             char_width,
             underline_position: 0.0,
             underline_thickness: 0.0,
+            strikethrough_position: 0.0,
+            strikethrough_thickness: 0.0,
         }
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/render/mod.rs 
new/neovim-gtk-0.2.0+git.1609586374.c036492/src/render/mod.rs
--- old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/render/mod.rs       
2020-01-25 14:51:02.000000000 +0100
+++ new/neovim-gtk-0.2.0+git.1609586374.c036492/src/render/mod.rs       
2021-01-02 12:19:34.000000000 +0100
@@ -6,11 +6,11 @@
 pub use self::context::{Context, FontFeatures};
 use self::model_clip_iterator::{ModelClipIteratorFactory, RowView};
 
-use cairo;
 use crate::color;
+use crate::sys::pangocairo::*;
+use cairo;
 use pango;
 use pangocairo;
-use crate::sys::pangocairo::*;
 
 use crate::cursor::{cursor_rect, Cursor};
 use crate::highlight::HighlightMap;
@@ -65,7 +65,7 @@
 
         for (col, cell) in row_view.line.line.iter().enumerate() {
             draw_cell(&row_view, hl, cell, col, line_x, 0.0);
-            draw_underline(&row_view, hl, cell, line_x, 0.0);
+            draw_underline_strikethrough(&row_view, hl, cell, line_x, 0.0);
 
             line_x += char_width;
         }
@@ -139,7 +139,7 @@
                 cell_start_line_x,
                 cursor_alpha,
             );
-            draw_underline(&row_view, hl, cell, line_x, cursor_alpha);
+            draw_underline_strikethrough(&row_view, hl, cell, line_x, 
cursor_alpha);
         } else {
             ctx.move_to(line_x, line_y);
             cursor.draw(ctx, font_ctx, line_y, double_width, &hl);
@@ -147,14 +147,14 @@
     }
 }
 
-fn draw_underline(
+fn draw_underline_strikethrough(
     cell_view: &RowView,
     hl: &HighlightMap,
     cell: &ui_model::Cell,
     line_x: f64,
     inverse_level: f64,
 ) {
-    if cell.hl.underline || cell.hl.undercurl {
+    if cell.hl.underline || cell.hl.undercurl || cell.hl.strikethrough {
         let &RowView {
             ctx,
             line_y,
@@ -164,11 +164,22 @@
                     char_width,
                     underline_position,
                     underline_thickness,
+                    strikethrough_position,
+                    strikethrough_thickness,
                     ..
                 },
             ..
         } = cell_view;
 
+        if cell.hl.strikethrough {
+            let fg = hl.actual_cell_fg(cell).inverse(inverse_level);
+            ctx.set_source_rgb(fg.0, fg.1, fg.2);
+            ctx.set_line_width(strikethrough_thickness);
+            ctx.move_to(line_x, line_y + strikethrough_position);
+            ctx.line_to(line_x + char_width, line_y + strikethrough_position);
+            ctx.stroke();
+        }
+
         if cell.hl.undercurl {
             let sp = hl.actual_cell_sp(cell).inverse(inverse_level);
             ctx.set_source_rgba(sp.0, sp.1, sp.2, 0.7);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/shell.rs 
new/neovim-gtk-0.2.0+git.1609586374.c036492/src/shell.rs
--- old/neovim-gtk-0.2.0+git.1579960262.0af8952/src/shell.rs    2020-01-25 
14:51:02.000000000 +0100
+++ new/neovim-gtk-0.2.0+git.1609586374.c036492/src/shell.rs    2021-01-02 
12:19:34.000000000 +0100
@@ -317,6 +317,12 @@
         self.transparency_settings.enabled
     }
 
+    pub fn set_cursor_blink(&mut self, val: i32) {
+        if let Some(cursor) = &mut self.cursor {
+            cursor.set_cursor_blink(val);
+        }
+    }
+
     pub fn open_file(&self, path: &str) {
         if let Some(mut nvim) = self.nvim() {
             nvim.command_async(&format!("e {}", path))

++++++ neovim-gtk-vendor.tar.xz ++++++
/work/SRC/openSUSE:Factory/neovim-gtk/neovim-gtk-vendor.tar.xz 
/work/SRC/openSUSE:Factory/.neovim-gtk.new.28504/neovim-gtk-vendor.tar.xz 
differ: char 25, line 1

Reply via email to