/* Skip data block with negative block number.
* Should not happen, because of the ml_preserve()
* above. Get same block again for next index. */
- ++idx;
+ ++idx;
continue;
}
internal_error("no text property below deleted line");
return;
}
- this_props_len = line_size - textlen;
+ this_props_len = line_size - (int)textlen;
}
found = FALSE;
if ((long)textlen < line_size)
{
- textprop_save_len = line_size - textlen;
+ textprop_save_len = line_size - (int)textlen;
textprop_save = vim_memsave((char_u *)dp + line_start + textlen,
textprop_save_len);
}
// the text prop info would also be counted. Go over the
// lines.
for (i = end_idx; i < idx; ++i)
- size += STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1;
+ size += (int)STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1;
}
else
#endif
// lengths.
len = 0;
for (i = start_idx; i <= idx; ++i)
- len += STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
+ len += (int)STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
}
else
#endif
if (lnum == end_lnum)
length = end_col - col;
else
- length = textlen - col + 1;
+ length = (int)textlen - col + 1;
if (length > (long)textlen)
- length = textlen; // can include the end-of-line
+ length = (int)textlen; // can include the end-of-line
if (length < 0)
length = 0; // zero-width property
if (dirty)
{
curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
- curbuf->b_ml.ml_line_len = textlen + wi * sizeof(textprop_T);
+ curbuf->b_ml.ml_line_len = (int)textlen + wi * sizeof(textprop_T);
}
}