comparison src/highlight.c @ 17781:04245f071792 v8.1.1887

patch 8.1.1887: the +cmdline_compl feature is not in the tiny version commit https://github.com/vim/vim/commit/0a52df50a0e8fce6f5e0eb5f5373dcd0fa24d83a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 18 22:26:31 2019 +0200 patch 8.1.1887: the +cmdline_compl feature is not in the tiny version Problem: The +cmdline_compl feature is not in the tiny version. Solution: Graduate the +cmdline_compl feature.
author Bram Moolenaar <Bram@vim.org>
date Sun, 18 Aug 2019 22:30:04 +0200
parents c8df7f8ccdf8
children ec1717981acf
comparison
equal deleted inserted replaced
17780:a65bba9901de 17781:04245f071792
3497 #endif // USER_HIGHLIGHT 3497 #endif // USER_HIGHLIGHT
3498 3498
3499 return OK; 3499 return OK;
3500 } 3500 }
3501 3501
3502 #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
3503
3504 static void highlight_list(void); 3502 static void highlight_list(void);
3505 static void highlight_list_two(int cnt, int attr); 3503 static void highlight_list_two(int cnt, int attr);
3506 3504
3507 /* 3505 /*
3508 * Handle command line completion for :highlight command. 3506 * Handle command line completion for :highlight command.
3575 msg_clr_eos(); 3573 msg_clr_eos();
3576 out_flush(); 3574 out_flush();
3577 ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE); 3575 ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE);
3578 } 3576 }
3579 3577
3580 #endif // FEAT_CMDL_COMPL
3581
3582 #if defined(FEAT_CMDL_COMPL) || (defined(FEAT_SYN_HL) && defined(FEAT_EVAL)) \
3583 || defined(FEAT_SIGNS) || defined(PROTO)
3584 /* 3578 /*
3585 * Function given to ExpandGeneric() to obtain the list of group names. 3579 * Function given to ExpandGeneric() to obtain the list of group names.
3586 */ 3580 */
3587 char_u * 3581 char_u *
3588 get_highlight_name(expand_T *xp UNUSED, int idx) 3582 get_highlight_name(expand_T *xp UNUSED, int idx)
3603 // Items are never removed from the table, skip the ones that were 3597 // Items are never removed from the table, skip the ones that were
3604 // cleared. 3598 // cleared.
3605 if (skip_cleared && idx < highlight_ga.ga_len && HL_TABLE()[idx].sg_cleared) 3599 if (skip_cleared && idx < highlight_ga.ga_len && HL_TABLE()[idx].sg_cleared)
3606 return (char_u *)""; 3600 return (char_u *)"";
3607 3601
3608 #ifdef FEAT_CMDL_COMPL
3609 if (idx == highlight_ga.ga_len && include_none != 0) 3602 if (idx == highlight_ga.ga_len && include_none != 0)
3610 return (char_u *)"none"; 3603 return (char_u *)"none";
3611 if (idx == highlight_ga.ga_len + include_none && include_default != 0) 3604 if (idx == highlight_ga.ga_len + include_none && include_default != 0)
3612 return (char_u *)"default"; 3605 return (char_u *)"default";
3613 if (idx == highlight_ga.ga_len + include_none + include_default 3606 if (idx == highlight_ga.ga_len + include_none + include_default
3614 && include_link != 0) 3607 && include_link != 0)
3615 return (char_u *)"link"; 3608 return (char_u *)"link";
3616 if (idx == highlight_ga.ga_len + include_none + include_default + 1 3609 if (idx == highlight_ga.ga_len + include_none + include_default + 1
3617 && include_link != 0) 3610 && include_link != 0)
3618 return (char_u *)"clear"; 3611 return (char_u *)"clear";
3619 #endif
3620 if (idx >= highlight_ga.ga_len) 3612 if (idx >= highlight_ga.ga_len)
3621 return NULL; 3613 return NULL;
3622 return HL_TABLE()[idx].sg_name; 3614 return HL_TABLE()[idx].sg_name;
3623 } 3615 }
3624 #endif
3625 3616
3626 #if defined(FEAT_GUI) || defined(PROTO) 3617 #if defined(FEAT_GUI) || defined(PROTO)
3627 /* 3618 /*
3628 * Free all the highlight group fonts. 3619 * Free all the highlight group fonts.
3629 * Used when quitting for systems which need it. 3620 * Used when quitting for systems which need it.