943 } |
943 } |
944 |
944 |
945 // ------------------------------------------------------------------------------------------------- |
945 // ------------------------------------------------------------------------------------------------- |
946 // |
946 // |
947 FUNCTION |
947 FUNCTION |
948 Interface::tab_complete (const String& part, const String& complete) -> void |
948 Interface::tab_complete (const String& part, String complete) -> void |
949 { |
949 { |
950 String& input = mutable_current_input(); |
950 String& input = mutable_current_input(); |
951 |
951 |
952 if (input.starts_with (part)) |
952 if (input.starts_with (part)) |
953 { |
953 { |
|
954 if (input[part.length()] != ' ') |
|
955 complete += ' '; |
|
956 |
954 input.replace (0, part.length(), complete); |
957 input.replace (0, part.length(), complete); |
955 g_cursor = complete.length(); |
958 g_cursor = complete.length(); |
956 g_needInputRender = true; |
959 g_needInputRender = true; |
957 } |
960 } |
958 } |
961 } |