Mercurial > vim
comparison src/terminal.c @ 28315:62cc3b60493b v8.2.4683
patch 8.2.4683: verbose check with dict_find() to see if a key is present
Commit: https://github.com/vim/vim/commit/4829c1c9e9095a3303caec9af7d02f6547f6df0e
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon Apr 4 15:16:54 2022 +0100
patch 8.2.4683: verbose check with dict_find() to see if a key is present
Problem: Verbose check with dict_find() to see if a key is present.
Solution: Add dict_has_key(). (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10074)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Apr 2022 16:30:04 +0200 |
parents | dd804c17e7e3 |
children | d1702731786c |
comparison
equal
deleted
inserted
replaced
28314:7bc5b23adf8f | 28315:62cc3b60493b |
---|---|
4309 | 4309 |
4310 p = dict_get_string(dict, (char_u *)"bad", FALSE); | 4310 p = dict_get_string(dict, (char_u *)"bad", FALSE); |
4311 if (p != NULL) | 4311 if (p != NULL) |
4312 get_bad_opt(p, &ea); | 4312 get_bad_opt(p, &ea); |
4313 | 4313 |
4314 if (dict_find(dict, (char_u *)"bin", -1) != NULL) | 4314 if (dict_has_key(dict, "bin")) |
4315 ea.force_bin = FORCE_BIN; | 4315 ea.force_bin = FORCE_BIN; |
4316 if (dict_find(dict, (char_u *)"binary", -1) != NULL) | 4316 if (dict_has_key(dict, "binary")) |
4317 ea.force_bin = FORCE_BIN; | 4317 ea.force_bin = FORCE_BIN; |
4318 if (dict_find(dict, (char_u *)"nobin", -1) != NULL) | 4318 if (dict_has_key(dict, "nobin")) |
4319 ea.force_bin = FORCE_NOBIN; | 4319 ea.force_bin = FORCE_NOBIN; |
4320 if (dict_find(dict, (char_u *)"nobinary", -1) != NULL) | 4320 if (dict_has_key(dict, "nobinary")) |
4321 ea.force_bin = FORCE_NOBIN; | 4321 ea.force_bin = FORCE_NOBIN; |
4322 } | 4322 } |
4323 | 4323 |
4324 // open in new window, like ":split fname" | 4324 // open in new window, like ":split fname" |
4325 if (ea.cmd == NULL) | 4325 if (ea.cmd == NULL) |