comparison src/ops.c @ 18763:49b78d6465e5 v8.1.2371

patch 8.1.2371: FEAT_TEXT_PROP is a confusing name Commit: https://github.com/vim/vim/commit/05ad5ff0ab34ed9a5296dedd420ca81698b8ce22 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 30 22:48:27 2019 +0100 patch 8.1.2371: FEAT_TEXT_PROP is a confusing name Problem: FEAT_TEXT_PROP is a confusing name. Solution: Use FEAT_PROP_POPUP. (Naruhiko Nishino, closes https://github.com/vim/vim/issues/5291)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Nov 2019 23:00:05 +0100
parents 788d76db02ac
children 7982f65d8f54
comparison
equal deleted inserted replaced
18762:19582783e5ad 18763:49b78d6465e5
826 oldp += bd.textcol + bd.textlen; 826 oldp += bd.textcol + bd.textlen;
827 STRMOVE(newp + bd.textcol + bd.startspaces + bd.endspaces, oldp); 827 STRMOVE(newp + bd.textcol + bd.startspaces + bd.endspaces, oldp);
828 /* replace the line */ 828 /* replace the line */
829 ml_replace(lnum, newp, FALSE); 829 ml_replace(lnum, newp, FALSE);
830 830
831 #ifdef FEAT_TEXT_PROP 831 #ifdef FEAT_PROP_POPUP
832 if (curbuf->b_has_textprop && n != 0) 832 if (curbuf->b_has_textprop && n != 0)
833 adjust_prop_columns(lnum, bd.textcol, -n, 0); 833 adjust_prop_columns(lnum, bd.textcol, -n, 0);
834 #endif 834 #endif
835 } 835 }
836 836
1946 int ret = OK; 1946 int ret = OK;
1947 int *comments = NULL; 1947 int *comments = NULL;
1948 int remove_comments = (use_formatoptions == TRUE) 1948 int remove_comments = (use_formatoptions == TRUE)
1949 && has_format_option(FO_REMOVE_COMS); 1949 && has_format_option(FO_REMOVE_COMS);
1950 int prev_was_comment; 1950 int prev_was_comment;
1951 #ifdef FEAT_TEXT_PROP 1951 #ifdef FEAT_PROP_POPUP
1952 textprop_T **prop_lines = NULL; 1952 textprop_T **prop_lines = NULL;
1953 int *prop_lengths = NULL; 1953 int *prop_lengths = NULL;
1954 #endif 1954 #endif
1955 1955
1956 if (save_undo && u_save((linenr_T)(curwin->w_cursor.lnum - 1), 1956 if (save_undo && u_save((linenr_T)(curwin->w_cursor.lnum - 1),
2070 goto theend; 2070 goto theend;
2071 } 2071 }
2072 cend = newp + sumsize; 2072 cend = newp + sumsize;
2073 *cend = 0; 2073 *cend = 0;
2074 2074
2075 #ifdef FEAT_TEXT_PROP 2075 #ifdef FEAT_PROP_POPUP
2076 // We need to move properties of the lines that are going to be deleted to 2076 // We need to move properties of the lines that are going to be deleted to
2077 // the new long one. 2077 // the new long one.
2078 if (curbuf->b_has_textprop && !text_prop_frozen) 2078 if (curbuf->b_has_textprop && !text_prop_frozen)
2079 { 2079 {
2080 // Allocate an array to copy the text properties of joined lines into. 2080 // Allocate an array to copy the text properties of joined lines into.
2112 2112
2113 mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t, 2113 mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t,
2114 (long)(cend - newp - spaces_removed), spaces_removed); 2114 (long)(cend - newp - spaces_removed), spaces_removed);
2115 if (t == 0) 2115 if (t == 0)
2116 break; 2116 break;
2117 #ifdef FEAT_TEXT_PROP 2117 #ifdef FEAT_PROP_POPUP
2118 if (prop_lines != NULL) 2118 if (prop_lines != NULL)
2119 adjust_props_for_join(curwin->w_cursor.lnum + t, 2119 adjust_props_for_join(curwin->w_cursor.lnum + t,
2120 prop_lines + t - 1, prop_lengths + t - 1, 2120 prop_lines + t - 1, prop_lengths + t - 1,
2121 (long)(cend - newp - spaces_removed), spaces_removed); 2121 (long)(cend - newp - spaces_removed), spaces_removed);
2122 #endif 2122 #endif
2127 if (insert_space && t > 1) 2127 if (insert_space && t > 1)
2128 curr = skipwhite(curr); 2128 curr = skipwhite(curr);
2129 currsize = (int)STRLEN(curr); 2129 currsize = (int)STRLEN(curr);
2130 } 2130 }
2131 2131
2132 #ifdef FEAT_TEXT_PROP 2132 #ifdef FEAT_PROP_POPUP
2133 if (prop_lines != NULL) 2133 if (prop_lines != NULL)
2134 join_prop_lines(curwin->w_cursor.lnum, newp, 2134 join_prop_lines(curwin->w_cursor.lnum, newp,
2135 prop_lines, prop_lengths, count); 2135 prop_lines, prop_lengths, count);
2136 else 2136 else
2137 #endif 2137 #endif