From f8134f2fd1e2effe79d011b1ff12ebb8719c3ffe Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sat, 20 Jun 2020 01:57:07 +0200 Subject: screen.c: remove fold_line as well as copy_text_attr, text_to_screenline. Display of folded line is now done via win_line, which reduces code deduplication. As fold_line was a trimmed down version of win_line, this change brings new features such CursorLineNr highighting even on folded line, as well as CursorLine highlighting. --- test/functional/ui/fold_spec.lua | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'test/functional/ui/fold_spec.lua') diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index 6ec45064da..9fe4b2580f 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -21,6 +21,8 @@ describe("folded lines", function() [5] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey}, [6] = {background = Screen.colors.Yellow}, [7] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.WebGray}, + [8] = {foreground = Screen.colors.Brown }, + [9] = {bold = true, foreground = Screen.colors.Brown} }) end) @@ -29,7 +31,7 @@ describe("folded lines", function() feed("i") feed("vkzf") screen:expect([[ - {5: ^+-- 2 lines: ·············}| + {7: }{5:^+-- 2 lines: ·············}| {1:~ }| {1:~ }| {1:~ }| @@ -49,8 +51,8 @@ describe("folded lines", function() funcs.setline(4, 'line 2') feed("j") screen:expect([[ - {7:+ }{5: 1 +-- 2 lines: ·························}| - {7:+ }{5: 0 ^+-- 2 lines: ·························}| + {7:+ }{8: 1 }{5:+-- 2 lines: ·························}| + {7:+ }{9: 0 }{5:^+-- 2 lines: ·························}| {1:~ }| {1:~ }| {1:~ }| @@ -130,17 +132,27 @@ describe("folded lines", function() ]]) feed('vkzf') - screen:expect([[ - {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ ﺎﻠﻋَﺮَﺒِﻳَّﺓ·················}| + -- screen:snapshot_util() + -- screen:expect([[ + -- {5:^+-- 2 lines: å 语 x̎͛ العَرَبِيَّة········ + -- {1:~ }| + -- {1:~ }| + -- {1:~ }| + -- {1:~ }| + -- {1:~ }| + -- {1:~ }| + -- | + -- ]]) + screen:expect{grid=[[ + {5:^+-- 2 lines: å 语 x̎͛ العَرَبِيَّة·················}| {1:~ }| {1:~ }| {1:~ }| {1:~ }| {1:~ }| {1:~ }| - | - ]]) - + | + ]]} feed_command("set noarabicshape") screen:expect([[ {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة·················}| -- cgit From a958039f0ad7cd4f6a139fde18795c88c623a30e Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Mon, 21 Sep 2020 14:50:24 +0200 Subject: screen: more work on fold_line replacement --- test/functional/ui/fold_spec.lua | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'test/functional/ui/fold_spec.lua') diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index 9fe4b2580f..fe67b9f6b0 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -132,27 +132,17 @@ describe("folded lines", function() ]]) feed('vkzf') - -- screen:snapshot_util() - -- screen:expect([[ - -- {5:^+-- 2 lines: å 语 x̎͛ العَرَبِيَّة········ - -- {1:~ }| - -- {1:~ }| - -- {1:~ }| - -- {1:~ }| - -- {1:~ }| - -- {1:~ }| - -- | - -- ]]) screen:expect{grid=[[ - {5:^+-- 2 lines: å 语 x̎͛ العَرَبِيَّة·················}| + {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة·················}| {1:~ }| {1:~ }| {1:~ }| {1:~ }| {1:~ }| {1:~ }| - | + | ]]} + feed_command("set noarabicshape") screen:expect([[ {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة·················}| @@ -167,7 +157,7 @@ describe("folded lines", function() feed_command("set number foldcolumn=2") screen:expect([[ - {7:+ }{5: 1 ^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة···········}| + {7:+ }{8: 1 }{5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة···········}| {1:~ }| {1:~ }| {1:~ }| @@ -180,7 +170,7 @@ describe("folded lines", function() -- Note: too much of the folded line gets cut off.This is a vim bug. feed_command("set rightleft") screen:expect([[ - {5:+-- 2 lines: å ······················^· 1 }{7: +}| + {5:···········ةيَّبِرَعَلا x̎͂̀̂͛͛ 语 å :senil 2 --^+}{8: 1 }{7: +}| {1: ~}| {1: ~}| {1: ~}| @@ -192,7 +182,7 @@ describe("folded lines", function() feed_command("set nonumber foldcolumn=0") screen:expect([[ - {5:+-- 2 lines: å 语 x̎͂̀̂͛͛ ال·····················^·}| + {5:·················ةيَّبِرَعَلا x̎͂̀̂͛͛ 语 å :senil 2 --^+}| {1: ~}| {1: ~}| {1: ~}| @@ -204,7 +194,7 @@ describe("folded lines", function() feed_command("set arabicshape") screen:expect([[ - {5:+-- 2 lines: å 语 x̎͂̀̂͛͛ ﺍﻟ·····················^·}| + {5:·················ةيَّبِرَعَلا x̎͂̀̂͛͛ 语 å :senil 2 --^+}| {1: ~}| {1: ~}| {1: ~}| -- cgit