annotate runtime/bugreport.vim @ 32876:522f16e3e058 v9.0.1747

patch 9.0.1747: screenpos() may cause unnecessary redraw Commit: https://github.com/vim/vim/commit/6235a109c48ff2559eca3b16578c429ffb61eadc Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Aug 19 14:12:42 2023 +0200 patch 9.0.1747: screenpos() may cause unnecessary redraw Problem: screenpos() may cause unnecessary redraw. Solution: Don't unnecessarily reset VALID_WROW flag. VALID_WROW flag is only used by two functions: validate_cursor() and cursor_valid(), and cursor_valid() is only used once in ex_sleep(). When adjust_plines_for_skipcol() was first added in patch 9.0.0640, it was called in two functions: comp_botline() and curs_rows(). - comp_botline() is called in two places: - onepage(), which resets VALID_WROW flag immediately afterwards. - validate_botline_win(), where resetting a VALID_ flag is strange. - curs_rows() is called in two places: - curs_columns(), which sets VALID_WROW flag afterwards. - validate_cline_row(), which is only used by GUI mouse focus. Therefore resetting VALID_WROW there doesn't seem to do anything useful. Also, a w_skipcol check (which resets VALID_WROW flag) was added to check_cursor_moved() in patch 9.0.0734, which seems to make more sense than resetting that flag in the middle of a computation. While at it make adjust_plines_for_skipcol() and textpos2screenpos() a bit less confusing: - Make adjust_plines_for_skipcol() return "off" instead of "n - off". - Use 0-based "row" in textpos2screenpos() until W_WINROW is added. closes: #12832 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 19 Aug 2023 14:30:02 +0200
parents 4027cefc2aab
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 :" Use this script to create the file "bugreport.txt", which contains
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 :" information about the environment of a possible bug in Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 :"
32770
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 15729
diff changeset
4 :" Maintainer: The Vim Project <https://github.com/vim/vim>
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 15729
diff changeset
5 :" Last change: 2023 Aug 10
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 15729
diff changeset
6 :" Former Maintainer: Bram Moolenaar <Bram@vim.org>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 :"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 :" To use inside Vim:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 :" :so $VIMRUNTIME/bugreport.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 :" Or, from the command line:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 :" vim -s $VIMRUNTIME/bugreport.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 :"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 :" The "if 1" lines are to avoid error messages when expression evaluation is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 :" not compiled in.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 :"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 : let more_save = &more
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 :set nomore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 :if has("unix")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 : !echo "uname -a" >bugreport.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 : !uname -a >>bugreport.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 :redir >>bugreport.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 :version
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 : func <SID>CheckDir(n)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 : if isdirectory(a:n)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 : echo 'directory "' . a:n . '" exists'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 : else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 : echo 'directory "' . a:n . '" does NOT exist'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 : endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 : endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 : func <SID>CheckFile(n)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 : if filereadable(a:n)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 : echo '"' . a:n . '" is readable'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 : else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 : echo '"' . a:n . '" is NOT readable'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 : endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 : endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 : echo "--- Directories and Files ---"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 : echo '$VIM = "' . $VIM . '"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 : call <SID>CheckDir($VIM)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 : echo '$VIMRUNTIME = "' . $VIMRUNTIME . '"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 : call <SID>CheckDir($VIMRUNTIME)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 : call <SID>CheckFile(&helpfile)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 : call <SID>CheckFile(fnamemodify(&helpfile, ":h") . "/tags")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 : call <SID>CheckFile($VIMRUNTIME . "/menu.vim")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 : call <SID>CheckFile($VIMRUNTIME . "/filetype.vim")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 : call <SID>CheckFile($VIMRUNTIME . "/syntax/synload.vim")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 : delfun <SID>CheckDir
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 : delfun <SID>CheckFile
323
03b3684919e3 updated for version 7.0084
vimboss
parents: 7
diff changeset
53 : echo "--- Scripts sourced ---"
03b3684919e3 updated for version 7.0084
vimboss
parents: 7
diff changeset
54 : scriptnames
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 :set all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 :set termcap
15729
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 323
diff changeset
58 :au
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 : echo "--- Normal/Visual mode mappings ---"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 :map
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 : echo "--- Insert/Command-line mode mappings ---"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 :map!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 : echo "--- Abbreviations ---"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 :ab
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 : echo "--- Highlighting ---"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 :highlight
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 : echo "--- Variables ---"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 : let
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 :redir END
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 :set more&
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 :if 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 : let &more = more_save
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 : unlet more_save
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 :e bugreport.txt