Hello community, here is the log from the commit of package vis for openSUSE:Factory checked in at 2020-04-18 00:30:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vis (Old) and /work/SRC/openSUSE:Factory/.vis.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vis" Sat Apr 18 00:30:20 2020 rev:2 rq:794694 version:0.5+git.1584517720.08a550d Changes: -------- --- /work/SRC/openSUSE:Factory/vis/vis.changes 2020-02-27 14:36:38.325945737 +0100 +++ /work/SRC/openSUSE:Factory/.vis.new.2738/vis.changes 2020-04-18 00:32:14.726277815 +0200 @@ -1,0 +2,10 @@ +Thu Apr 16 22:18:41 UTC 2020 - mc...@cepl.eu + +- Update to version 0.5+git.1584517720.08a550d: + * color-column: Don't change fg/bg if not set explicitly + * Set single cursor style as primary, not secondary + * sam: fix X and Y commands which were interchanged + * Add Elm lexer + * sam: fix spurious "file exists" warnings + +------------------------------------------------------------------- Old: ---- vis-0.5+git.1582699959.bdfea7e.tar.xz New: ---- vis-0.5+git.1584517720.08a550d.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vis.spec ++++++ --- /var/tmp/diff_new_pack.MF5W1C/_old 2020-04-18 00:32:15.786280010 +0200 +++ /var/tmp/diff_new_pack.MF5W1C/_new 2020-04-18 00:32:15.790280018 +0200 @@ -17,7 +17,7 @@ Name: vis -Version: 0.5+git.1582699959.bdfea7e +Version: 0.5+git.1584517720.08a550d Release: 0 Summary: An editor combining the strengths of both vi(m) and sam License: ISC ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.MF5W1C/_old 2020-04-18 00:32:15.854280150 +0200 +++ /var/tmp/diff_new_pack.MF5W1C/_new 2020-04-18 00:32:15.854280150 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/martanne/vis.git</param> - <param name="changesrevision">bdfea7e6c1d1a7ad5b3d479bb2c30c7e610f2ee6</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">08a550deac6f55f32f131f66992994b3944011ce</param></service></servicedata> \ No newline at end of file ++++++ vis-0.5+git.1582699959.bdfea7e.tar.xz -> vis-0.5+git.1584517720.08a550d.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vis-0.5+git.1582699959.bdfea7e/lua/lexers/elm.lua new/vis-0.5+git.1584517720.08a550d/lua/lexers/elm.lua --- old/vis-0.5+git.1582699959.bdfea7e/lua/lexers/elm.lua 1970-01-01 01:00:00.000000000 +0100 +++ new/vis-0.5+git.1584517720.08a550d/lua/lexers/elm.lua 2020-03-18 08:48:40.000000000 +0100 @@ -0,0 +1,64 @@ +-- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. +-- Elm LPeg lexer +-- Modified by Alex Suraci. +-- Adapted from Haskell LPeg lexer by Karl Schultheisz. + +local l = require('lexer') +local token, word_match = l.token, l.word_match +local P, R, S = lpeg.P, lpeg.R, lpeg.S + +local M = {_NAME = 'elm'} + +-- Whitespace. +local ws = token(l.WHITESPACE, l.space^1) + +-- Comments. +local line_comment = '--' * l.nonnewline_esc^0 +local block_comment = '{-' * (l.any - '-}')^0 * P('-}')^-1 +local comment = token(l.COMMENT, line_comment + block_comment) + +-- Strings. +local string = token(l.STRING, l.delimited_range('"')) + +-- Chars. +local char = token(l.STRING, l.delimited_range("'", true)) + +-- Numbers. +local number = token(l.NUMBER, l.float + l.integer) + +-- Keywords. +local keyword = token(l.KEYWORD, word_match{ + 'if', 'then', 'else', + 'case', 'of', + 'let', 'in', + 'module', 'import', 'as', 'exposing', + 'type', 'alias', + 'port', +}) + +-- Identifiers. +local word = (l.alnum + S("._'#"))^0 +local identifier = token(l.IDENTIFIER, (l.alpha + '_') * word) + +-- Operators. +local op = l.punct - S('()[]{}') +local operator = token(l.OPERATOR, op) + +-- Types & type constructors. +local constructor = token(l.TYPE, (l.upper * word) + (P(":") * (op^1 - P(":")))) + +M._rules = { + {'whitespace', ws}, + {'keyword', keyword}, + {'type', constructor}, + {'identifier', identifier}, + {'string', string}, + {'char', char}, + {'comment', comment}, + {'number', number}, + {'operator', operator}, +} + +M._FOLDBYINDENTATION = true + +return M diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vis-0.5+git.1582699959.bdfea7e/lua/plugins/filetype.lua new/vis-0.5+git.1584517720.08a550d/lua/plugins/filetype.lua --- old/vis-0.5+git.1582699959.bdfea7e/lua/plugins/filetype.lua 2020-02-26 07:52:39.000000000 +0100 +++ new/vis-0.5+git.1584517720.08a550d/lua/plugins/filetype.lua 2020-03-18 08:48:40.000000000 +0100 @@ -116,6 +116,9 @@ elixir = { ext = { "%.ex$", "%.exs$" }, }, + elm = { + ext = { "%.elm$" }, + }, erlang = { ext = { "%.erl$", "%.hrl$" }, }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vis-0.5+git.1582699959.bdfea7e/sam.c new/vis-0.5+git.1584517720.08a550d/sam.c --- old/vis-0.5+git.1582699959.bdfea7e/sam.c 2020-02-26 07:52:39.000000000 +0100 +++ new/vis-0.5+git.1584517720.08a550d/sam.c 2020-03-18 08:48:40.000000000 +0100 @@ -1558,8 +1558,8 @@ for (Win *win = vis->windows; win; win = win->next) { if (win->file->internal) continue; - bool match = !cmd->regex || (win->file->name && - text_regex_match(cmd->regex, win->file->name, 0)); + bool match = !cmd->regex || + (win->file->name && text_regex_match(cmd->regex, win->file->name, 0) == 0); if (match ^ (argv[0][0] == 'Y')) { Filerange def = text_range_new(0, 0); ret &= sam_execute(vis, win, cmd->cmd, NULL, &def); @@ -1702,7 +1702,7 @@ file_name_set(file, path); same_file = true; } - if (same_file) + if (same_file || (!existing_file && strcmp(file->name, path) == 0)) file->stat = text_stat(text); vis_event_emit(vis, VIS_EVENT_FILE_SAVE_POST, file, path); free(path); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vis-0.5+git.1582699959.bdfea7e/ui-terminal-curses.c new/vis-0.5+git.1584517720.08a550d/ui-terminal-curses.c --- old/vis-0.5+git.1582699959.bdfea7e/ui-terminal-curses.c 2020-02-26 07:52:39.000000000 +0100 +++ new/vis-0.5+git.1584517720.08a550d/ui-terminal-curses.c 2020-03-18 08:48:40.000000000 +0100 @@ -289,3 +289,7 @@ ui_curses_suspend(term); endwin(); } + +bool is_default_color(CellColor c) { + return c == CELL_COLOR_DEFAULT; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vis-0.5+git.1582699959.bdfea7e/ui-terminal-vt100.c new/vis-0.5+git.1584517720.08a550d/ui-terminal-vt100.c --- old/vis-0.5+git.1582699959.bdfea7e/ui-terminal-vt100.c 2020-02-26 07:52:39.000000000 +0100 +++ new/vis-0.5+git.1584517720.08a550d/ui-terminal-vt100.c 2020-03-18 08:48:40.000000000 +0100 @@ -215,3 +215,7 @@ ui_vt100_suspend(tui); buffer_release(&vtui->buf); } + +bool is_default_color(CellColor c) { + return c.index == ((CellColor) CELL_COLOR_DEFAULT).index; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vis-0.5+git.1582699959.bdfea7e/ui.h new/vis-0.5+git.1584517720.08a550d/ui.h --- old/vis-0.5+git.1582699959.bdfea7e/ui.h 2020-02-26 07:52:39.000000000 +0100 +++ new/vis-0.5+git.1584517720.08a550d/ui.h 2020-03-18 08:48:40.000000000 +0100 @@ -115,4 +115,6 @@ int (*window_height)(UiWin*); }; +bool is_default_color(CellColor c); + #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vis-0.5+git.1582699959.bdfea7e/vis.c new/vis-0.5+git.1584517720.08a550d/vis.c --- old/vis-0.5+git.1582699959.bdfea7e/vis.c 2020-02-26 07:52:39.000000000 +0100 +++ new/vis-0.5+git.1584517720.08a550d/vis.c 2020-03-18 08:48:40.000000000 +0100 @@ -27,6 +27,8 @@ #include "util.h" #include "vis-core.h" #include "sam.h" +#include "ui.h" + static void macro_replay(Vis *vis, const Macro *macro); static void macro_replay_internal(Vis *vis, const Macro *macro); @@ -294,7 +296,10 @@ /* This screen line contains the cell we want to highlight */ if (cc <= line_cols + width) { - l->cells[(cc - 1) - line_cols].style = style; + CellStyle *orig = &l->cells[cc - 1 - line_cols].style; + orig->attr = style.attr; + orig->fg = is_default_color(style.fg) ? orig->fg : style.fg; + orig->bg = is_default_color(style.bg) ? orig->bg : style.bg; line_cc_set = true; } else { line_cols += width; @@ -402,7 +407,6 @@ static void window_draw_selections(Win *win) { View *view = win->view; Filerange viewport = view_viewport_get(view); - bool multiple_cursors = view_selections_count(view) > 1; Selection *sel = view_selections_primary_get(view); CellStyle style_cursor = win->ui->style_get(win->ui, UI_STYLE_CURSOR); CellStyle style_cursor_primary = win->ui->style_get(win->ui, UI_STYLE_CURSOR_PRIMARY); @@ -415,7 +419,7 @@ window_draw_cursor(win, s, &style_cursor, &style_selection); } window_draw_selection(win->view, sel, &style_selection); - window_draw_cursor(win, sel, multiple_cursors ? &style_cursor_primary : &style_cursor, &style_selection); + window_draw_cursor(win, sel, &style_cursor_primary, &style_selection); for (Selection *s = view_selections_next(sel); s; s = view_selections_next(s)) { window_draw_selection(win->view, s, &style_selection); size_t pos = view_cursors_pos(s);