Fine, but it most definitely is not what some people want. For example, I have this code:
if (foo === bar)
The cursor is at the end of "bar". I trigger delete word. I don't want the space before "bar" to be deleted, I just want to replace the word "bar". For me at least, 90% of the time I do not want the space deleted along with the word because I am replacing the word. That's why I suggest the following:
# If there's a single space after the word, eat that too if setting says to
if not did_eat_extra_space and len(txt) > count and at_boundary and view.settings().get("delete_space_with_word", True):
This way we at least have the option to change the default behavior without copying and tweaking the command ourselves.