コード例 #1
0
ファイル: vi_mode.c プロジェクト: AOSC-Dev/metahtml
/* Completion, from vi's point of view. */
int
rl_vi_complete (int ignore, int key)
{
  if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
    {
      if (!whitespace (rl_line_buffer[rl_point + 1]))
	rl_vi_end_word (1, 'E');
      rl_point++;
    }

  if (key == '*')
    rl_complete_internal ('*');	/* Expansion and replacement. */
  else if (key == '=')
    rl_complete_internal ('?');	/* List possible completions. */
  else if (key == '\\')
    rl_complete_internal (TAB);	/* Standard Readline completion. */
  else
    rl_complete (0, key);

  if (key == '*' || key == '\\')
    {
      _rl_vi_set_last (key, 1, rl_arg_sign);
      rl_vi_insertion_mode (ignore, key);
    }
  return (0);
}
コード例 #2
0
ファイル: pr25947-1.c プロジェクト: 0day-ci/gcc
void
rl_vi_complete (int ignore, int key)
{
  if ((rl_point < rl_end)
      &&
      (!(((rl_line_buffer[rl_point]) == ' ')
	 || ((rl_line_buffer[rl_point]) == '\t'))))
    {
      if (!
	  (((rl_line_buffer[rl_point + 1]) == ' ')
	   || ((rl_line_buffer[rl_point + 1]) == '\t')))
	rl_vi_end_word (1, 'E');
    }
}