map_get_editor(): * Retrieve the editor */
| 1098 | * Retrieve the editor |
| 1099 | */ |
| 1100 | protected int |
| 1101 | map_get_editor(EditLine *el, const Char **editor) |
| 1102 | { |
| 1103 | |
| 1104 | if (editor == NULL) |
| 1105 | return -1; |
| 1106 | switch (el->el_map.type) { |
| 1107 | case MAP_EMACS: |
| 1108 | *editor = STR("emacs"); |
| 1109 | return 0; |
| 1110 | case MAP_VI: |
| 1111 | *editor = STR("vi"); |
| 1112 | return 0; |
| 1113 | } |
| 1114 | return -1; |
| 1115 | } |
| 1116 | |
| 1117 | |
| 1118 | /* map_print_key(): |