comparison src/editors.c @ 766:7148e125bf23

Check for existing editor command using is_valid_editor_command().
author zas_
date Fri, 30 May 2008 07:20:25 +0000
parents 477f48ba28d8
children ff51413f098d
comparison
equal deleted inserted replaced
765:339db85846da 766:7148e125bf23
806 editor_command_next_start(ed); 806 editor_command_next_start(ed);
807 /* errors from editor_command_next_start will be handled via callback */ 807 /* errors from editor_command_next_start will be handled via callback */
808 return flags & EDITOR_ERROR_MASK; 808 return flags & EDITOR_ERROR_MASK;
809 } 809 }
810 810
811 static gint is_valid_editor_command(gint n) 811 gboolean is_valid_editor_command(gint n)
812 { 812 {
813 return (n >= 0 && n < GQ_EDITOR_SLOTS 813 return (n >= 0 && n < GQ_EDITOR_SLOTS
814 && options->editor[n].command 814 && options->editor[n].command
815 && strlen(options->editor[n].command) > 0); 815 && strlen(options->editor[n].command) > 0);
816 } 816 }