# Resizable columns \(\#34794\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/326fe05b331118cdb7d630f04c379dd0facb28ad)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 326fe05b331118cdb7d630f04c379dd0facb28ad

Requested commit: 326fe05b331118cdb7d630f04c379dd0facb28ad

Commit: 326fe05b331118cdb7d630f04c379dd0facb28ad

Tree: 81c62cca95971ba3776f218a74a8a40a6b22f51a

Author: Mikayla Maki

Committer: GitHub

## Message

```
Resizable columns (#34794)

This PR adds resizable columns to the keymap editor and the ability to
double-click on a resizable column to set a column back to its default
size.

The table uses a column's width to calculate what position it should be
laid out at. So `column[i]` x position is calculated by the summation of
`column[..i]`. When resizing `column[i]`, `column[i+1]`’s size is
adjusted to keep all columns’ relative positions the same. If
`column[i+1]` is at its minimum size, we keep seeking to the right to
find a column with space left to take.

An improvement to resizing behavior and double-clicking could be made by
checking both column ranges `0..i-1` and `i+1..COLS`, since only one
range of columns is checked for resize capacity.

Release Notes:

- N/A

---------

Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
```

## Parents

- [1f4c9b9427437952839489a6399e5300dd579dfe](https://git.cafe/gitcafe/zed/commit/1f4c9b9427437952839489a6399e5300dd579dfe?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/326fe05b331118cdb7d630f04c379dd0facb28ad?format=markdown)
