corrected check when to set the modified line is new flag

one of the conditions for setting this flag was when the cursor ends up
at the end of the line and characters were added, however, this check
incorrectly sets the flag for certain conditions like when a selection
is replaced - characters are added but the new flag should not be set

the check was changed to if lines were added by using the net line count