revert libedit FreeBSD hack, will endeavour to fix properly
This commit is contained in:
@@ -918,11 +918,34 @@ vi_comment_out(EditLine *el, Int c)
|
||||
* NB: posix implies that we should enter insert mode, however
|
||||
* this is against historical precedent...
|
||||
*/
|
||||
#ifdef __weak_reference
|
||||
__weakref_visible char *my_get_alias_text(const char *)
|
||||
__weak_reference(get_alias_text);
|
||||
#endif
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_alias(EditLine *el, Int c)
|
||||
{
|
||||
#ifdef __weak_reference
|
||||
char alias_name[3];
|
||||
char *alias_text;
|
||||
|
||||
if (my_get_alias_text == 0) {
|
||||
return CC_ERROR;
|
||||
}
|
||||
|
||||
alias_name[0] = '_';
|
||||
alias_name[2] = 0;
|
||||
if (el_getc(el, &alias_name[1]) != 1)
|
||||
return CC_ERROR;
|
||||
|
||||
alias_text = my_get_alias_text(alias_name);
|
||||
if (alias_text != NULL)
|
||||
FUN(el,push)(el, ct_decode_string(alias_text, &el->el_scratch));
|
||||
return CC_NORM;
|
||||
#else
|
||||
return CC_ERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* vi_to_history_line():
|
||||
|
Reference in New Issue
Block a user