In "color-words" mode, show word-diff of words accumulated in the buffer */
| 2279 | |
| 2280 | /* In "color-words" mode, show word-diff of words accumulated in the buffer */ |
| 2281 | static void diff_words_flush(struct emit_callback *ecbdata) |
| 2282 | { |
| 2283 | struct diff_options *wo = ecbdata->diff_words->opt; |
| 2284 | |
| 2285 | if (ecbdata->diff_words->minus.text.size || |
| 2286 | ecbdata->diff_words->plus.text.size) |
| 2287 | diff_words_show(ecbdata->diff_words); |
| 2288 | |
| 2289 | if (wo->emitted_symbols) { |
| 2290 | struct diff_options *o = ecbdata->opt; |
| 2291 | struct emitted_diff_symbols *wol = wo->emitted_symbols; |
| 2292 | int i; |
| 2293 | |
| 2294 | /* |
| 2295 | * NEEDSWORK: |
| 2296 | * Instead of appending each, concat all words to a line? |
| 2297 | */ |
| 2298 | for (i = 0; i < wol->nr; i++) |
| 2299 | append_emitted_diff_symbol(o, &wol->buf[i]); |
| 2300 | |
| 2301 | for (i = 0; i < wol->nr; i++) |
| 2302 | free((void *)wol->buf[i].line); |
| 2303 | |
| 2304 | wol->nr = 0; |
| 2305 | } |
| 2306 | } |
| 2307 | |
| 2308 | static void diff_filespec_load_driver(struct diff_filespec *one, |
| 2309 | struct index_state *istate) |
no test coverage detected