Mercurial > vim
comparison src/terminal.c @ 20830:9064044fd4f6 v8.2.0967
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Commit: https://github.com/vim/vim/commit/71ccd03ee8a43b20000214a9c99dcc90f039edca
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 12 22:59:11 2020 +0200
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Jun 2020 23:00:04 +0200 |
parents | c81f61e3b508 |
children | d0265fdadec9 |
comparison
equal
deleted
inserted
replaced
20829:3d0d6410aecd | 20830:9064044fd4f6 |
---|---|
3009 | 3009 |
3010 switch (prop) | 3010 switch (prop) |
3011 { | 3011 { |
3012 case VTERM_PROP_TITLE: | 3012 case VTERM_PROP_TITLE: |
3013 strval = vim_strnsave((char_u *)value->string.str, | 3013 strval = vim_strnsave((char_u *)value->string.str, |
3014 (int)value->string.len); | 3014 value->string.len); |
3015 if (strval == NULL) | 3015 if (strval == NULL) |
3016 break; | 3016 break; |
3017 vim_free(term->tl_title); | 3017 vim_free(term->tl_title); |
3018 // a blank title isn't useful, make it empty, so that "running" is | 3018 // a blank title isn't useful, make it empty, so that "running" is |
3019 // displayed | 3019 // displayed |
3071 may_set_cursor_props(term); | 3071 may_set_cursor_props(term); |
3072 break; | 3072 break; |
3073 | 3073 |
3074 case VTERM_PROP_CURSORCOLOR: | 3074 case VTERM_PROP_CURSORCOLOR: |
3075 strval = vim_strnsave((char_u *)value->string.str, | 3075 strval = vim_strnsave((char_u *)value->string.str, |
3076 (int)value->string.len); | 3076 value->string.len); |
3077 if (strval == NULL) | 3077 if (strval == NULL) |
3078 break; | 3078 break; |
3079 cursor_color_copy(&term->tl_cursor_color, strval); | 3079 cursor_color_copy(&term->tl_cursor_color, strval); |
3080 may_set_cursor_props(term); | 3080 may_set_cursor_props(term); |
3081 break; | 3081 break; |