| 235 | } |
| 236 | |
| 237 | static void buf2keyseq(const char *buff, keyseq &k) |
| 238 | { |
| 239 | // Sanity check |
| 240 | if (!buff) |
| 241 | return; |
| 242 | |
| 243 | // convert c_str to keyseq |
| 244 | |
| 245 | // Check for user functions |
| 246 | if (*buff == '=' && buff[1] == '=' && buff[2] == '=' && buff[3]) |
| 247 | { |
| 248 | int index = userfunc_getindex(buff + 3); |
| 249 | if (index != -1) |
| 250 | k.push_back(USERFUNCBASE - index); |
| 251 | } |
| 252 | else |
| 253 | { |
| 254 | const int len = strlen(buff); |
| 255 | for (int i = 0; i < len; i++) |
| 256 | k.push_back(buff[i]); |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | static int _name_to_keycode(string s) |
| 261 | { |
no test coverage detected