mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
(is_in_indent): refactoring, return gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
dc9df84693
commit
d3b7b5987b
@ -723,15 +723,23 @@ edit_get_prev_utf (WEdit * edit, long byte_index, int *char_width)
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/* high level cursor movement commands */
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/** check whether cursor is in indent part of line
|
||||
*
|
||||
* @param edit editor object
|
||||
*
|
||||
* @return TRUE if cursor is in indent, FALSE otherwise
|
||||
*/
|
||||
|
||||
static int
|
||||
static gboolean
|
||||
is_in_indent (WEdit * edit)
|
||||
{
|
||||
long p = edit_bol (edit, edit->curs1);
|
||||
while (p < edit->curs1)
|
||||
if (!strchr (" \t", edit_get_byte (edit, p++)))
|
||||
return 0;
|
||||
return 1;
|
||||
long p;
|
||||
|
||||
for (p = edit_bol (edit, edit->curs1); p < edit->curs1; p++)
|
||||
if (strchr (" \t", edit_get_byte (edit, p)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user