Currently calling indentation on a line that is already indented as expected results in buffer being modified despite no changes being actually done. Avoid this by checking if current indentation already matches the one we just calculated and only reindenting on mismatch.
Currently calling indentation on a line that is already indented as expected results in buffer being modified despite no changes being actually done. Avoid this by checking if current indentation already matches the one we just calculated and only reindenting on mismatch.